=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: ddraw/tests: The testbot applies color keying without a key.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 23 10:03:19 CDT 2015


Module: wine
Branch: master
Commit: daf3e8a0dcde52b33af53db7d540af5e4e913306
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=daf3e8a0dcde52b33af53db7d540af5e4e913306

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Fri Mar 20 12:47:11 2015 +0100

ddraw/tests: The testbot applies color keying without a key.

---

 dlls/ddraw/tests/ddraw1.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index f59355e..ca61f13 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -6211,14 +6211,24 @@ static void test_texturemapblend(void)
     hr = IDirect3DDevice_EndScene(device);
     ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
 
+    /* WARP (Win8 testbot) emulates color keying with the alpha channel like Wine does,
+     * but even applies it when there's no color key assigned. The surface alpha is zero
+     * here, so nothing gets drawn.
+     *
+     * The ddraw2 version of this test draws these quads with color keying off due to
+     * different defaults in ddraw1 and ddraw2. */
     color = get_surface_color(rt, 5, 5);
-    ok(compare_color(color, 0x00ff0040, 2), "Got unexpected color 0x%08x.\n", color);
+    ok(compare_color(color, 0x00ff0040, 2) || broken(compare_color(color, 0x00000000, 1)),
+            "Got unexpected color 0x%08x.\n", color);
     color = get_surface_color(rt, 400, 5);
-    ok(compare_color(color, 0x00ff0080, 2), "Got unexpected color 0x%08x.\n", color);
+    ok(compare_color(color, 0x00ff0080, 2) || broken(compare_color(color, 0x00000000, 1)),
+            "Got unexpected color 0x%08x.\n", color);
     color = get_surface_color(rt, 5, 245);
-    ok(compare_color(color, 0x00800080, 2), "Got unexpected color 0x%08x.\n", color);
+    ok(compare_color(color, 0x00800080, 2) || broken(compare_color(color, 0x00000000, 1)),
+            "Got unexpected color 0x%08x.\n", color);
     color = get_surface_color(rt, 400, 245);
-    ok(compare_color(color, 0x008000ff, 2), "Got unexpected color 0x%08x.\n", color);
+    ok(compare_color(color, 0x008000ff, 2) || broken(compare_color(color, 0x00000000, 1)),
+            "Got unexpected color 0x%08x.\n", color);
 
     IDirect3DTexture_Release(texture);
     ref = IDirectDrawSurface_Release(surface);




More information about the wine-cvs mailing list