Signed-off-by: Stefan Dösinger stefan@codeweavers.com
---
They are a gcc thing, Visual Studio rejects them. --- dlls/d3d11/tests/d3d11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 1dbd4050011..f378ae52ecc 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -19422,9 +19422,9 @@ static void test_uav_load(void) #define R32_FLOAT DXGI_FORMAT_R32_FLOAT #define R32_UINT DXGI_FORMAT_R32_UINT #define R32_SINT DXGI_FORMAT_R32_SINT - {&ps_ld_2d_float, &float_2d, {R32_FLOAT, TEX_2D, 0}, {}, (const DWORD *)float_data}, - {&ps_ld_2d_uint, &uint_2d, {R32_UINT, TEX_2D, 0}, {}, (const DWORD *)uint_data}, - {&ps_ld_2d_int, &int_2d, {R32_SINT, TEX_2D, 0}, {}, (const DWORD *)int_data}, + {&ps_ld_2d_float, &float_2d, {R32_FLOAT, TEX_2D, 0}, {0}, (const DWORD *)float_data}, + {&ps_ld_2d_uint, &uint_2d, {R32_UINT, TEX_2D, 0}, {0}, (const DWORD *)uint_data}, + {&ps_ld_2d_int, &int_2d, {R32_SINT, TEX_2D, 0}, {0}, (const DWORD *)int_data}, {&ps_ld_2d_uint_arr, &uint2d_arr, {R32_UINT, TEX_2D_ARRAY, 0, 0, ~0u}, {0}, (const DWORD *)uint_data}, {&ps_ld_2d_uint_arr, &uint2d_arr, {R32_UINT, TEX_2D_ARRAY, 0, 0, ~0u}, {1}, (const DWORD *)uint_data2}, {&ps_ld_2d_uint_arr, &uint2d_arr, {R32_UINT, TEX_2D_ARRAY, 0, 0, ~0u}, {2}, (const DWORD *)uint_data3},
Signed-off-by: Stefan Dösinger stefan@codeweavers.com
---
And luckily they are macros, so we can detect it with #ifdefs. --- include/wine/port.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/include/wine/port.h b/include/wine/port.h index d23e2b033f1..b3ef4b905a9 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -58,9 +58,15 @@ #ifdef _MSC_VER
#define ftruncate chsize -#define isfinite(x) _finite(x) -#define isinf(x) (!(_finite(x) || _isnan(x))) -#define isnan(x) _isnan(x) +#ifndef isfinite +# define isfinite(x) _finite(x) +#endif +#ifndef isinf +# define isinf(x) (!(_finite(x) || _isnan(x))) +#endif +#ifndef isnan +# define isnan(x) _isnan(x) +#endif #define popen _popen #define pclose _pclose #define snprintf _snprintf
And it is a function prototype, so we can't use #ifndef.
Signed-off-by: Stefan Dösinger stefan@codeweavers.com
---
I am also open to just removing the define. It was added in 817fb975. --- include/wine/port.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/wine/port.h b/include/wine/port.h index b3ef4b905a9..264f2828373 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -69,7 +69,13 @@ #endif #define popen _popen #define pclose _pclose -#define snprintf _snprintf +/* The UCRT headers in the Windows SDK #error out if we #define snprintf. + * The C headers that came with previous Visual Studio versions do not have + * snprintf. Check for VS 2015, which appears to be the first version to + * use the UCRT headers by default. */ +#if _MSC_VER < 1900 +# define snprintf _snprintf +#endif #define strtoll _strtoi64 #define strtoull _strtoui64 #define strncasecmp _strnicmp
Signed-off-by: Stefan Dösinger stefan@codeweavers.com
---
Visual Studio does not support inline assembly or naked functions in x86_64. We would have to move these functions to a separate asm file to hand-write them.
These functions exist in VS 2012, but not in VS 2003. I don't have the intermediate versions installed. We could replace the __naked 32 bit functions with these new ones if we don't care about breaking older VS versions. The *Pointer intrinsics don't exist on 32 bit, so some #ifdefs would still be needed. --- libs/port/interlocked.c | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
diff --git a/libs/port/interlocked.c b/libs/port/interlocked.c index 59b852f7e9f..040ab756eba 100644 --- a/libs/port/interlocked.c +++ b/libs/port/interlocked.c @@ -138,6 +138,47 @@ __ASM_GLOBAL_FUNC(interlocked_xchg_add,
#elif defined(__x86_64__)
+#if defined(_MSC_VER) + +#include <intrin.h> + +int interlocked_cmpxchg(int *dest, int xchg, int compare) +{ + return _InterlockedCompareExchange(dest, xchg, compare); +} + +void *interlocked_cmpxchg_ptr(void **dest, void *xchg, void *compare) +{ + return _InterlockedCompareExchangePointer(dest, xchg, compare); +} + +__int64 interlocked_cmpxchg64(__int64 *dest, __int64 xchg, __int64 compare) +{ + return _InterlockedCompareExchange64(dest, xchg, compare); +} + +int interlocked_xchg(int *dest, int val) +{ + return _InterlockedExchange(dest, val); +} + +void *interlocked_xchg_ptr(void **dest, void *val) +{ + return _InterlockedExchangePointer(dest, val); +} + +int interlocked_xchg_add(int *dest, int incr) +{ + return _InterlockedExchangeAdd(dest, incr); +} + +int interlocked_cmpxchg128(__int64 *dest, __int64 xchg_high, __int64 xchg_low, __int64 *compare) +{ + return _InterlockedCompareExchange128(dest, xchg_high, xchg_low, compare); +} + +#else + __ASM_GLOBAL_FUNC(interlocked_cmpxchg, "mov %edx, %eax\n\t" "lock cmpxchgl %esi,(%rdi)\n\t" @@ -179,6 +220,7 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg128, __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") __ASM_CFI(".cfi_same_value %rbx\n\t") "ret") +#endif
#elif defined(__powerpc__)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=60309
Your paranoid android.
=== w2008s64 (32 bit report) ===
d3d11: d3d11.c:6106: Test failed: Got unexpected NumPrimitivesWritten: 4293910286. d3d11.c:6109: Test failed: Got unexpected PrimitivesStorageNeeded: 4294967295.
=== w1064v1809 (32 bit report) ===
d3d11: d3d11.c:5776: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5777: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5778: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5781: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5782: Test failed: Got unexpected CPrimitives count: 0.
=== w1064v1809_2scr (32 bit report) ===
d3d11: d3d11.c:5776: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5777: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5778: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5781: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5782: Test failed: Got unexpected CPrimitives count: 0.
=== w1064v1809_ar (32 bit report) ===
d3d11: d3d11.c:5776: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5777: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5778: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5781: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5782: Test failed: Got unexpected CPrimitives count: 0.
=== w1064v1809_ja (32 bit report) ===
d3d11: d3d11.c:5776: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5777: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5778: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5781: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5782: Test failed: Got unexpected CPrimitives count: 0.
=== w1064v1809_zh_CN (32 bit report) ===
d3d11: d3d11.c:5776: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5777: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5778: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5781: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5782: Test failed: Got unexpected CPrimitives count: 0.
=== debian10 (32 bit report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:6119: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian10 (32 bit French report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:6119: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:16860: Test failed: Got {-1.00787401e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001} at (0, 0), sub-resource 0.
=== debian10 (32 bit Japanese:Japan report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:6119: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:16860: Test failed: Got {-1.00003052e+000, 0.00000000e+000, 1.00000000e+000, 0.00000000e+000}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 0. d3d11.c:17958: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0xffffffff, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:17958: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0xffffffff, 0x00000000, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:17958: Test failed: Got {0xffffffff, 0x00000001, 0x00000000, 0x00000000}, expected {0x00000000, 0x00000001, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:16860: Test failed: Got {-1.00787401e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001} at (0, 0), sub-resource 0. d3d11.c:17958: Test failed: Got {0x00000001, 0xffffffff, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000000, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:27602: Test failed: Resource type 1, test 7: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 1, test 7: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 1, test 7: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 1, test 7: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 1, test 7: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 1, test 7: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 1, test 7: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 1, test 7: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 1, test 8: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 1, test 8: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 1, test 8: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 1, test 8: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 1, test 8: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 1, test 8: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 1, test 8: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 1, test 8: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 2, test 7: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 2, test 7: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 2, test 7: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 2, test 7: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 2, test 7: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 2, test 7: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 2, test 7: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 2, test 7: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 2, test 8: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 2, test 8: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 2, test 8: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 2, test 8: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 2, test 8: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 2, test 8: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 2, test 8: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 2, test 8: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 3, test 7: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 3, test 7: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 3, test 7: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 3, test 7: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 3, test 7: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 3, test 7: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 3, test 7: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 3, test 7: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 3, test 8: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 3, test 8: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27602: Test failed: Resource type 3, test 8: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 3, test 8: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27602: Test failed: Resource type 3, test 8: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 3, test 8: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27602: Test failed: Resource type 3, test 8: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27602: Test failed: Resource type 3, test 8: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:25838: Test failed: Got depth 2.51951814e-003, expected 2.51948950e-003. d3d11.c:25838: Test failed: Got depth 2.51951814e-003, expected 2.51948950e-003. d3d11.c:25838: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25838: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25838: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25838: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25838: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25838: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25838: Test failed: Got depth 5.03277779e-003, expected 5.03897900e-003. d3d11.c:25838: Test failed: Got depth 5.03277779e-003, expected 5.03897900e-003. d3d11.c:25838: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25838: Test failed: Got depth 7.52645731e-003, expected 7.53897894e-003. d3d11.c:25838: Test failed: Got depth 7.52645731e-003, expected 7.53897894e-003. d3d11.c:25838: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25838: Test failed: Got depth 1.25139356e-002, expected 1.25389788e-002. d3d11.c:25838: Test failed: Got depth 1.25139356e-002, expected 1.25389788e-002. d3d11.c:25838: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25838: Test failed: Got depth 6.40938997e-001, expected 6.42538965e-001. d3d11.c:25838: Test failed: Got depth 6.40938997e-001, expected 6.42538965e-001. d3d11.c:25838: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25838: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25838: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25846: Test failed: Got value 0x149d4 (5.03277809e-003), expected 0x14a3c (5.03897697e-003). d3d11.c:25846: Test failed: Got value 0x149d4 (5.03277809e-003), expected 0x14a3c (5.03897697e-003). d3d11.c:25846: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25846: Test failed: Got value 0x1ed41 (7.52645776e-003), expected 0x1ee13 (7.53897473e-003). d3d11.c:25846: Test failed: Got value 0x1ed41 (7.52645776e-003), expected 0x1ee13 (7.53897473e-003). d3d11.c:25846: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25846: Test failed: Got value 0x3341d (1.25139363e-002), expected 0x335c1 (1.25389703e-002). d3d11.c:25846: Test failed: Got value 0x3341d (1.25139363e-002), expected 0x335c1 (1.25389703e-002). d3d11.c:25846: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25846: Test failed: Got value 0xa41493 (6.40938976e-001), expected 0xa47d6e (6.42538943e-001). d3d11.c:25846: Test failed: Got value 0xa41493 (6.40938976e-001), expected 0xa47d6e (6.42538943e-001). d3d11.c:25846: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25846: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25846: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25855: Test failed: Got value 0x3d8 (1.50148775e-002), expected 0x3da (1.50453956e-002). d3d11.c:25855: Test failed: Got value 0x3d8 (1.50148775e-002), expected 0x3da (1.50453956e-002). d3d11.c:25855: Test failed: Got value 0x333 (1.24971389e-002), expected 0x336 (1.25429160e-002). d3d11.c:25855: Test failed: Got value 0x333 (1.24971389e-002), expected 0x336 (1.25429160e-002). d3d11.c:25855: Test failed: Got value 0x479 (1.74715801e-002), expected 0x47d (1.75326162e-002). d3d11.c:25855: Test failed: Got value 0x479 (1.74715801e-002), expected 0x47d (1.75326162e-002). d3d11.c:25855: Test failed: Got value 0xa414 (6.40939956e-001), expected 0xa47c (6.42526894e-001). d3d11.c:25855: Test failed: Got value 0xa414 (6.40939956e-001), expected 0xa47c (6.42526894e-001).
Report errors: d3d11:d3d11 prints too much data (35785 bytes)
=== debian10 (32 bit Chinese:China report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
Report errors: d3d11:d3d11 has no test summary line (early exit of the main process?) d3d11:d3d11 has unaccounted for failure messages d3d11:d3d11 has unaccounted for todo messages d3d11:d3d11 has unaccounted for skip messages d3d11:d3d11 returned success despite having failures
=== debian10 (build log) ===
X Error of failed request: GLXBadFBConfig Major opcode of failed request: 150 (GLX) Minor opcode of failed request: 34 ()