ddraw1 doesn't draw, so presumably not affected. Can't find any crashes in the testbot history http://test.winehq.org/data/4364ff8d5c0387edd6fae142affe8e844b291518/win81_n... http://test.winehq.org/data/d03984709d87d6eaa0e2e7746f0db5d8fdf81b5a/win1507... I haven't found any examples of ddraw7 crashing in this test. Doesn't mean there aren't any. Let's wait and see.
Signed-off-by: Stefan Dösinger stefan@codeweavers.com --- dlls/ddraw/tests/ddraw2.c | 20 ++++++++++++++------ dlls/ddraw/tests/ddraw4.c | 9 +++++++++ 2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 625776c652c..1285fa1b682 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -1076,6 +1076,17 @@ static void test_coop_level_d3d_state(void) window = create_window(); ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); + + if (ddraw_is_warp(ddraw)) + { + /* ddraw2 crashes in EndScene, and if it doesn't crash it fails with + * DDERR_SURFACELOST on WARP. */ + win_skip("Skipping test that crashes WARP occasionally.\n"); + IDirectDraw2_Release(ddraw); + DestroyWindow(window); + return; + } + if (!(device = create_device(ddraw, window, DDSCL_NORMAL))) { skip("Failed to create a 3D device, skipping test.\n"); @@ -1159,12 +1170,9 @@ static void test_coop_level_d3d_state(void) hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, ARRAY_SIZE(quad), 0); ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == DD_OK || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST), "Got unexpected hr %#x.\n", hr); - if (hr == DD_OK) - { - color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color); - } + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + color = get_surface_color(rt, 320, 240); + ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color);
destroy_viewport(device, viewport); destroy_material(background); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 9b8acb674e3..6ed12d980db 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -1301,6 +1301,14 @@ static void test_coop_level_d3d_state(void) hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw); ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); IDirect3D3_Release(d3d); + + if (ddraw_is_warp(ddraw)) + { + /* ddraw4 occasionally crashes in GetRenderTarget. */ + win_skip("Skipping test that crashes WARP occasionally.\n"); + goto done; + } + hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); hr = IDirectDrawSurface4_IsLost(rt); @@ -1349,6 +1357,7 @@ static void test_coop_level_d3d_state(void) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), "Got unexpected color 0x%08x.\n", color);
+done: destroy_viewport(device, viewport); IDirectDrawSurface4_Release(surface); IDirectDrawSurface4_Release(rt);
Signed-off-by: Stefan Dösinger stefan@codeweavers.com --- dlls/ddraw/tests/ddraw1.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index c5afeff2343..11168d4a74d 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -11872,6 +11872,8 @@ static void test_texture_load(void) emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 4); emit_texture_load(&ptr, dst_texture_handle, src_texture_handle); emit_set_rs(&ptr, D3DRENDERSTATE_TEXTUREHANDLE, dst_texture_handle); + /* WARP randomly applies color keying without having a key set. */ + emit_set_rs(&ptr, D3DRENDERSTATE_COLORKEYENABLE, FALSE); emit_tquad(&ptr, 0); emit_end(&ptr); inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData - sizeof(tquad);
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=107157
Your paranoid android.
=== debian11 (32 bit Hindi:India report) ===
ddraw: ddraw1.c:14212: Test failed: Expect clip rect (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:14236: Test failed: Expect clip rect (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:14402: Test failed: Expect window rect (0,0)-(640,480), got (0,0)-(1024,737). ddraw1.c:14409: Test failed: Expect window rect (0,0)-(640,480), got (0,0)-(1024,737).
=== debian11 (64 bit WoW report) ===
ddraw: ddraw1.c:14402: Test failed: Expect window rect (0,0)-(640,480), got (0,0)-(1024,737). ddraw1.c:14409: Test failed: Expect window rect (0,0)-(640,480), got (0,0)-(1024,737).
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Stefan Dösinger stefan@codeweavers.com --- dlls/ddraw/tests/ddraw1.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 11168d4a74d..304671558af 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -2067,7 +2067,11 @@ static void test_ck_default(void) hr = IDirect3DDevice_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color); + /* Color keying is supposed to be on by default in ddraw1, but used only if a ckey is set. + * WARP begs to differ. The default of D3DRENDERSTATE_COLORKEYENABLE is random, and it + * doesn't mind the absence of a color key (the latter part affects other tests, not this one). */ + ok(compare_color(color, 0x0000ff00, 1) || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x000000ff, 1)), + "Got unexpected color 0x%08x.\n", color);
hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr);
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=107158
Your paranoid android.
=== debian11 (32 bit Arabic:Morocco report) ===
ddraw: ddraw1.c:3820: Test failed: Got unexpected screen width 800. ddraw1.c:3822: Test failed: Got unexpected screen height 600. ddraw1.c:3855: Test failed: Got unexpected screen width 800. ddraw1.c:3857: Test failed: Got unexpected screen height 600. ddraw1.c:3878: Test failed: Got unexpected screen width 800. ddraw1.c:3880: Test failed: Got unexpected screen height 600. ddraw1.c:3885: Test failed: Got unexpected screen width 800. ddraw1.c:3887: Test failed: Got unexpected screen height 600.
=== debian11 (32 bit German report) ===
ddraw: ddraw1.c:3997: Test failed: Got a different mode. ddraw1.c:4080: Test failed: Got a different mode.
=== debian11 (32 bit Japanese:Japan report) ===
ddraw: ddraw1.c:5713: Test failed: Failed to attach surface, hr 0x8876000a. ddraw1.c:5716: Test failed: Got unexpected hr 0x8876000a. ddraw1.c:5718: Test failed: Failed to detach surface, hr 0x88760014. ddraw1.c:5721: Test failed: Failed to attach surface, hr 0x8876000a. ddraw1.c:5726: Test failed: Failed to detach surface, hr 0x88760014. ddraw1.c:14406: Test failed: Expect window rect (0,0)-(640,480), got (0,0)-(1024,737). ddraw1.c:14413: Test failed: Expect window rect (0,0)-(640,480), got (0,0)-(1024,737).
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-of-by: Stefan Dösinger stefan@codeweavers.com
---
I don't want to just disable color keying because some of the tests here make a point that the results are different in ddraw1 (ckey on by default) vs ddraw2 (ckey off by default). The test doesn't bother about SPECULARENABLE, so I am fine with just overriding the broken WARP default. --- dlls/ddraw/tests/ddraw1.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 304671558af..25a19dffa18 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -8390,6 +8390,18 @@ static void test_texturemapblend(void) emit_set_rs(&ptr, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE); emit_set_rs(&ptr, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle);
+ /* SPECULARENABLE shouldn't matter in this test, but WARP begs to + * differ. In the event that color keying is randomly on(see comments + * in test_ck_default for reference), WARP will randomly discard + * geometry based on something, even though texture anddiffuse color + * alpha components are non - zero.Setting SPECULARENABLE to FALSE + * prevents this in some cases - presumably WARP multiplies the + * specular color "alpha" channel into the final result and then + * alpha tests the result.Since the specular property normally does + * not have an alpha component the actual specular color we set in + * the vertex data above does not matter. */ + emit_set_rs(&ptr, D3DRENDERSTATE_SPECULARENABLE, FALSE); + emit_tquad(&ptr, 0); emit_tquad(&ptr, 4); emit_end(&ptr); @@ -8407,6 +8419,7 @@ static void test_texturemapblend(void) hr = IDirect3DDevice_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+ /* The above SPECULARENABLE = FALSE on WARP matters here.*/ color = get_surface_color(rt, 5, 5); ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 400, 5); @@ -8476,14 +8489,25 @@ static void test_texturemapblend(void) hr = IDirect3DDevice_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+ /* Despite our best efforts at not making color keying randomly triggering, those + * four broken() results occur every now and then on WARP. Presumably the non- + * existent alpha channel sometimes samples 0.0 instead of the expected 1.0. */ color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2) + || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x00000000, 2)), + "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2) + || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x00000000, 2)), + "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2) + || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x00000000, 2)), + "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2) + || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x00000000, 2)), + "Got unexpected color 0x%08x.\n", color);
IDirect3DTexture_Release(texture); ref = IDirectDrawSurface_Release(surface);
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=107159
Your paranoid android.
=== debian11 (32 bit Arabic:Morocco report) ===
ddraw: ddraw1.c:3307: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3333: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3353: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3389: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480).
=== debian11 (32 bit Hebrew:Israel report) ===
ddraw: ddraw1.c:3130: Test failed: Got unexpected screen size 640x480. ddraw1.c:3136: Test failed: Expected message 0x7e, but didn't receive it. ddraw1.c:3184: Test failed: Expected message 0x47, but didn't receive it. ddraw1.c:3186: Test failed: Expected screen size 1024x768, got 0x0. ddraw1.c:3192: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3216: Test failed: Expected surface width 1024, got 640. ddraw1.c:3218: Test failed: Expected surface height 768, got 480. ddraw1.c:3222: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3229: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3234: Test failed: Expected surface width 1024, got 640. ddraw1.c:3236: Test failed: Expected surface height 768, got 480. ddraw1.c:3249: Test failed: Expected surface width 1024, got 640. ddraw1.c:3251: Test failed: Expected surface height 768, got 480. ddraw1.c:3255: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3278: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3298: Test failed: Got unexpected hr 0. ddraw1.c:3300: Test failed: Got unexpected hr 0. ddraw1.c:3307: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3312: Test failed: Expected surface width 1024, got 640. ddraw1.c:3314: Test failed: Expected surface height 768, got 480. ddraw1.c:3333: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3353: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480). ddraw1.c:3399: Test failed: Expected (0,0)-(1024,768), got (0,0)-(640,480).
=== debian11 (32 bit Japanese:Japan report) ===
ddraw: ddraw1.c:3529: Test failed: Expected resolution 1024x768, got 720x480. ddraw1.c:3546: Test failed: Expected surface width 1024, got 720.
Am 06.02.2022 um 20:07 schrieb Stefan Dösinger stefan@codeweavers.com:
Signed-of-by: Stefan Dösinger stefan@codeweavers.com
Signed-off-by: Stefan Dösinger stefan@codeweavers.com
On Sun, 6 Feb 2022 at 18:15, Stefan Dösinger stefan@codeweavers.com wrote:
- /* SPECULARENABLE shouldn't matter in this test, but WARP begs to
* differ. In the event that color keying is randomly on(see comments
* in test_ck_default for reference), WARP will randomly discard
* geometry based on something, even though texture anddiffuse color
* alpha components are non - zero.Setting SPECULARENABLE to FALSE
* prevents this in some cases - presumably WARP multiplies the
* specular color "alpha" channel into the final result and then
* alpha tests the result.Since the specular property normally does
* not have an alpha component the actual specular color we set in
* the vertex data above does not matter. */
- emit_set_rs(&ptr, D3DRENDERSTATE_SPECULARENABLE, FALSE);
I'm not quite sure what happened above, but that comment is full of white-space errors.
Am 08.02.2022 um 16:41 schrieb Henri Verbeet hverbeet@gmail.com:
On Sun, 6 Feb 2022 at 18:15, Stefan Dösinger stefan@codeweavers.com wrote:
- /* SPECULARENABLE shouldn't matter in this test, but WARP begs to
* differ. In the event that color keying is randomly on(see comments
* in test_ck_default for reference), WARP will randomly discard
* geometry based on something, even though texture anddiffuse color
* alpha components are non - zero.Setting SPECULARENABLE to FALSE
* prevents this in some cases - presumably WARP multiplies the
* specular color "alpha" channel into the final result and then
* alpha tests the result.Since the specular property normally does
* not have an alpha component the actual specular color we set in
* the vertex data above does not matter. */
- emit_set_rs(&ptr, D3DRENDERSTATE_SPECULARENABLE, FALSE);
I'm not quite sure what happened above, but that comment is full of white-space errors.
Ah, I typed that thing in notepad, copypasted it into Visual Studio later. Either my butterfly keyboard is going bad again or something decides to be smart about whitespace when copypasting...
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=107156
Your paranoid android.
=== w8 (32 bit report) ===
ddraw: 0c68:ddraw4: unhandled exception c0000005 at 004D22A4
=== w8adm (32 bit report) ===
ddraw: 0d00:ddraw4: unhandled exception c0000005 at 004D22A4
=== w864 (32 bit report) ===
ddraw: 09f4:ddraw4: unhandled exception c0000005 at 004D22A4
=== w1064v1507 (32 bit report) ===
ddraw: 05b8:ddraw4: unhandled exception c0000005 at 004D22A4
=== w1064v1809 (32 bit report) ===
ddraw: 1f0c:ddraw4: unhandled exception c0000005 at 004D22A4
=== w1064 (32 bit report) ===
ddraw: 1c1c:ddraw4: unhandled exception c0000005 at 004D22A4
=== w1064_tsign (32 bit report) ===
ddraw: 1010:ddraw4: unhandled exception c0000005 at 004D22A4
=== w10pro64 (32 bit report) ===
ddraw: 1ff4:ddraw4: unhandled exception c0000005 at 004D22A4
=== debian11 (32 bit Hebrew:Israel report) ===
ddraw: ddraw2.c:4048: Test failed: Got unexpected screen width 640. ddraw2.c:4050: Test failed: Got unexpected screen height 480. ddraw2.c:4071: Test failed: Got unexpected screen width 640. ddraw2.c:4073: Test failed: Got unexpected screen height 480. ddraw2.c:4078: Test failed: Got unexpected screen width 640. ddraw2.c:4080: Test failed: Got unexpected screen height 480. ddraw2.c:15242: Test failed: Expect clip rect (0,0)-(1024,768), got (0,0)-(640,480). ddraw2.c:15339: Test failed: Expect window rect (0,0)-(640,480), got (0,0)-(1024,737). ddraw2.c:15346: Test failed: Expect window rect (0,0)-(640,480), got (0,0)-(1024,737). ddraw4.c:2965: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw4.c:2998: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw4.c:3001: Test failed: Expected window extended style 0x108, got 0x8. ddraw4.c:3007: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw4.c:3010: Test failed: Expected window extended style 0x108, got 0x8. ddraw4.c:3030: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw4.c:3032: Test failed: Expected window extended style 0x100, got 0. ddraw4.c:3049: Test failed: Expected (0,0)-(640,480), got (-32000,-32000)-(-31840,-31976). ddraw4.c:3072: Test failed: Expected (0,0)-(640,480), got (-32000,-32000)-(-31840,-31976). ddraw4.c:3092: Test failed: Expected window style 0x4cf0000, got 0xa40b0000. ddraw4.c:3094: Test failed: Expected window extended style 0x100, got 0. ddraw4.c:4273: Test failed: Got unexpected screen width 800. ddraw4.c:4275: Test failed: Got unexpected screen height 600. ddraw4.c:4296: Test failed: Got unexpected screen width 800. ddraw4.c:4298: Test failed: Got unexpected screen height 600. ddraw4.c:4303: Test failed: Got unexpected screen width 800. ddraw4.c:4305: Test failed: Got unexpected screen height 600.
=== debian11 (32 bit Chinese:China report) ===
ddraw: ddraw2.c:3551: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw2.c:3573: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw2.c:3599: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw2.c:3619: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768). ddraw2.c:3656: Test failed: Expected (0,0)-(640,480), got (0,0)-(1024,768).
=== debian11 (32 bit WoW report) ===
ddraw: ddraw4.c:4273: Test failed: Got unexpected screen width 800. ddraw4.c:4275: Test failed: Got unexpected screen height 600. ddraw4.c:4296: Test failed: Got unexpected screen width 800. ddraw4.c:4298: Test failed: Got unexpected screen height 600. ddraw4.c:4303: Test failed: Got unexpected screen width 800. ddraw4.c:4305: Test failed: Got unexpected screen height 600.
Am 06.02.2022 um 21:42 schrieb Marvin testbot@winehq.org:
ddraw: 0c68:ddraw4: unhandled exception c0000005 at 004D22A4
Oops, somehow I missed that in my earlier testing. The "done" label releases a surface that's not valid at the time the test is skipped.
My computer is currently busy with Windows, I'll resend the patch later today. The other patches should apply independently.
Stefan