[PATCH 2/2] d3drm/tests: Do not depend on a todo_wine result more than necessary.
Stefan Dösinger
stefan at codeweavers.com
Wed Nov 10 05:56:08 CST 2021
This addresses a failure on the cw-gtx560 testbot machine reported by
Francois.
Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
---
Clearing with flag 0 works as intended. The todo_wine was only neccessary
because the previous contents were poorly defined.
---
dlls/d3drm/tests/d3drm.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c
index f1d48639c14..51d10d797bc 100644
--- a/dlls/d3drm/tests/d3drm.c
+++ b/dlls/d3drm/tests/d3drm.c
@@ -7286,13 +7286,23 @@ static void test_viewport_clear2(void)
ret_color = get_surface_color(surface, 500, 400);
todo_wine ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color);
+ /* Remove old draw contents */
+ hr = IDirect3DRMFrame3_SetSceneBackgroundRGB(frame3, 0.0f, 1.0f, 0.0f);
+ ok(SUCCEEDED(hr), "Cannot set scene background RGB (hr = %#x)\n", hr);
+ hr = IDirect3DRMViewport2_Configure(viewport2, 0, 0, rc.right, rc.bottom);
+ todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr);
+ hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL);
+ ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr);
+ hr = IDirect3DRMFrame3_SetSceneBackgroundRGB(frame3, 1.0f, 1.0f, 1.0f);
+ ok(SUCCEEDED(hr), "Cannot set scene background RGB (hr = %#x)\n", hr);
+
/* Clear with no flags */
hr = IDirect3DRMViewport2_Configure(viewport2, 0, 0, rc.right, rc.bottom);
todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr);
hr = IDirect3DRMViewport2_Clear(viewport2, 0);
ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr);
ret_color = get_surface_color(surface, 320, 240);
- todo_wine ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color);
+ ok(compare_color(ret_color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", ret_color);
hr = IDirect3DRMViewport2_Configure(viewport2, 0, 0, rc.right, rc.bottom);
todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr);
--
2.32.0
More information about the wine-devel
mailing list