Signed-off-by: Stefan Dösinger stefan@codeweavers.com
---
Version 2: Fix parenthesis. --- dlls/ddraw/tests/ddraw2.c | 8 +++++++- dlls/ddraw/tests/ddraw4.c | 8 +++++++- dlls/ddraw/tests/ddraw7.c | 9 +++++++-- 3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index f80d4fe3ab8..00c8f820edb 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -148,6 +148,11 @@ static BOOL ddraw_is_vendor(IDirectDraw2 *ddraw, DWORD vendor) && identifier.dwVendorId == vendor; }
+static BOOL ddraw_is_amd(IDirectDraw2 *ddraw) +{ + return ddraw_is_vendor(ddraw, 0x1002); +} + static BOOL ddraw_is_intel(IDirectDraw2 *ddraw) { return ddraw_is_vendor(ddraw, 0x8086); @@ -13640,7 +13645,8 @@ static void test_depth_readback(void) /* The ddraw2 version of this test behaves similarly to the ddraw7 version on Nvidia GPUs, * except that we only have D16 (broken on geforce 9) and D24X8 (broken on geforce 7) available. * Accept all nvidia GPUs as broken here, but still expect one of the formats to pass. */ - ok(compare_uint(expected_depth, depth, max_diff) || ddraw_is_nvidia(ddraw), + ok(compare_uint(expected_depth, depth, max_diff) || ddraw_is_nvidia(ddraw) + || (ddraw_is_amd(ddraw) && tests[i].z_depth == 24), "Test %u: Got depth 0x%08x (diff %d), expected 0x%08x+/-%u, at %u, %u.\n", i, depth, expected_depth - depth, expected_depth, max_diff, x, y); if (!compare_uint(expected_depth, depth, max_diff)) diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 4447c5675ea..a8b68b8a20b 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -149,6 +149,11 @@ static BOOL ddraw_is_vendor(IDirectDraw4 *ddraw, DWORD vendor) && identifier.dwVendorId == vendor; }
+static BOOL ddraw_is_amd(IDirectDraw4 *ddraw) +{ + return ddraw_is_vendor(ddraw, 0x1002); +} + static BOOL ddraw_is_intel(IDirectDraw4 *ddraw) { return ddraw_is_vendor(ddraw, 0x8086); @@ -16252,7 +16257,8 @@ static void test_depth_readback(void) * * Some of the tested places pass on some GPUs on Wine by accident. */ todo_wine_if(tests[i].todo && !compare_uint(expected_depth, depth, max_diff)) - ok(compare_uint(expected_depth, depth, max_diff) || ddraw_is_nvidia(ddraw), + ok(compare_uint(expected_depth, depth, max_diff) || ddraw_is_nvidia(ddraw) + || (ddraw_is_amd(ddraw) && !tests[i].s_depth && tests[i].z_mask == 0x00ffffff), "Test %u: Got depth 0x%08x (diff %d), expected 0x%08x+/-%u, at %u, %u.\n", i, depth, expected_depth - depth, expected_depth, max_diff, x, y); if (!compare_uint(expected_depth, depth, max_diff)) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index e5324cfe8bd..f4388296702 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15716,7 +15716,8 @@ static void test_depth_readback(void) depth = raw_value & tests[i].z_mask; expected_depth = (x * (0.9 / 640.0) + y * (0.1 / 480.0)) * tests[i].z_mask; max_diff = ((0.5f * 0.9f) / 640.0f) * tests[i].z_mask; - /* This test is very reliably on AMD, but fails in a number of interesting ways on Nvidia GPUs: + /* This test is very reliably on older AMD drivers, but fails in a number of interesting + * ways on Nvidia GPUs: * * Geforce 7 GPUs work only with D16. D24 and D24S8 return 0, D24X8 broken data. * @@ -15729,10 +15730,14 @@ static void test_depth_readback(void) * Arx Fatalis is broken on the Geforce 9 in the same way it was broken in Wine (bug 43654). * The !tests[i].s_depth is supposed to rule out D16 on GF9 and D24X8 on GF7. * + * On new-ish AMD GPUs (Radeon Polaris at least) returns weird data for D24 and D24X8. D16 + * and D24S8 work. + * * Some of the tested places pass on some GPUs on Wine by accident. */ todo_wine_if(tests[i].todo && !compare_uint(expected_depth, depth, max_diff)) ok(compare_uint(expected_depth, depth, max_diff) - || (ddraw_is_nvidia(ddraw) && (all_zero || all_one || !tests[i].s_depth)), + || (ddraw_is_nvidia(ddraw) && (all_zero || all_one || !tests[i].s_depth)) + || (ddraw_is_amd(ddraw) && !tests[i].s_depth && tests[i].z_mask == 0x00ffffff), "Test %u: Got depth 0x%08x (diff %d), expected 0x%08x+/-%u, at %u, %u.\n", i, depth, expected_depth - depth, expected_depth, max_diff, x, y); if (!compare_uint(expected_depth, depth, max_diff))
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=105838
Your paranoid android.
=== debian11 (32 bit French report) ===
ddraw: ddraw2.c:3624: Test failed: Expected resolution 640x480, got 800x600. ddraw2.c:3641: Test failed: Expected surface width 640, got 800. ddraw2.c:3643: Test failed: Expected surface height 480, got 600. ddraw2.c:3667: Test failed: Expected screen size 640x480, got 800x600. ddraw2.c:3674: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw2.c:3686: Test failed: Expected surface width 640, got 800. ddraw2.c:3688: Test failed: Expected surface height 480, got 600. ddraw2.c:3739: Test failed: Expected screen size 2 640x480, got 800x600. ddraw2.c:3747: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw2.c:3759: Test failed: Expected surface width 640, got 800. ddraw2.c:3761: Test failed: Expected surface height 480, got 600. ddraw7.c:3434: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw7.c:3456: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw7.c:3482: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw7.c:3502: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw7.c:3539: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768).
=== debian11 (32 bit Hebrew:Israel report) ===
ddraw: ddraw4.c:3971: Test failed: Expected screen size 2 640x480, got 720x480. ddraw4.c:3979: Test failed: Expected (0,0)-(640,480), got (0,0)-(720,480). ddraw4.c:3991: Test failed: Expected surface width 640, got 720.
=== debian11 (32 bit Japanese:Japan report) ===
ddraw: ddraw4.c:3797: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw4.c:3823: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw4.c:3843: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw4.c:3880: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768).
=== debian11 (32 bit Chinese:China report) ===
ddraw: ddraw4.c:711: Test failed: Got ddraw state 0x887600e1 on message 0x47, expected 0. ddraw4.c:704: Test failed: Got unexpected wparam 1 for message 5, expected 0. ddraw4.c:711: Test failed: Got ddraw state 0x887600e1 on message 0x5, expected 0. ddraw4.c:3457: Test failed: Expected message 0x7e, but didn't receive it. ddraw4.c:3464: Test failed: Got unexpected screen size 800x600. ddraw4.c:3520: Test failed: Expected screen size 640x480, got 800x600. ddraw4.c:3526: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3550: Test failed: Expected surface width 640, got 800. ddraw4.c:3552: Test failed: Expected surface height 480, got 600. ddraw4.c:3556: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3563: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3568: Test failed: Expected surface width 640, got 800. ddraw4.c:3570: Test failed: Expected surface height 480, got 600. ddraw4.c:3583: Test failed: Expected surface width 640, got 800. ddraw4.c:3585: Test failed: Expected surface height 480, got 600. ddraw4.c:3589: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3612: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3621: Test failed: Got unexpected hr 0. ddraw4.c:3634: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3639: Test failed: Expected surface width 640, got 800. ddraw4.c:3641: Test failed: Expected surface height 480, got 600. ddraw4.c:3660: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3680: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3693: Test failed: Expected resolution 640x480, got 800x600. ddraw4.c:3710: Test failed: Expected surface width 640, got 800. ddraw4.c:3712: Test failed: Expected surface height 480, got 600. ddraw4.c:3716: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3726: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3731: Test failed: Expected surface width 640, got 800. ddraw4.c:3733: Test failed: Expected surface height 480, got 600. ddraw4.c:3746: Test failed: Expected surface width 640, got 800. ddraw4.c:3748: Test failed: Expected surface height 480, got 600. ddraw4.c:3752: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3775: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3784: Test failed: Got unexpected hr 0. ddraw4.c:3797: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3802: Test failed: Expected surface width 640, got 800. ddraw4.c:3804: Test failed: Expected surface height 480, got 600. ddraw4.c:3823: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3843: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3856: Test failed: Expected resolution 640x480, got 800x600. ddraw4.c:3873: Test failed: Expected surface width 640, got 800. ddraw4.c:3875: Test failed: Expected surface height 480, got 600. ddraw4.c:3880: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3899: Test failed: Expected screen size 640x480, got 800x600. ddraw4.c:3906: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3918: Test failed: Expected surface width 640, got 800. ddraw4.c:3920: Test failed: Expected surface height 480, got 600. ddraw4.c:3971: Test failed: Expected screen size 2 640x480, got 800x600. ddraw4.c:3979: Test failed: Expected (0,0)-(640,480), got (0,0)-(800,600). ddraw4.c:3991: Test failed: Expected surface width 640, got 800. ddraw4.c:3993: Test failed: Expected surface height 480, got 600.
=== debian11 (64 bit WoW report) ===
ddraw: ddraw7.c:2616: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw7.c:2649: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw7.c:2652: Test failed: Expected window extended style 0x108, got 0x8. ddraw7.c:2658: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw7.c:2661: Test failed: Expected window extended style 0x108, got 0x8. ddraw7.c:2681: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw7.c:2683: Test failed: Expected window extended style 0x100, got 0. ddraw7.c:2700: Test failed: Expected (0,0)-(640,480), got (-32000,-32000)-(-31840,-31976). ddraw7.c:2723: Test failed: Expected (0,0)-(640,480), got (-32000,-32000)-(-31840,-31976). ddraw7.c:2743: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw7.c:2745: Test failed: Expected window extended style 0x100, got 0. ddraw7.c:3923: Test failed: Got unexpected screen width 800. ddraw7.c:3925: Test failed: Got unexpected screen height 600. ddraw7.c:3946: Test failed: Got unexpected screen width 800. ddraw7.c:3948: Test failed: Got unexpected screen height 600. ddraw7.c:3953: Test failed: Got unexpected screen width 800. ddraw7.c:3955: Test failed: Got unexpected screen height 600.