[PATCH] D3D9: Make the bumpmap test less picky=0A=

Stefan Doesinger stefan at codeweavers.com
Tue Aug 12 17:33:45 CDT 2008


=0A=
---=0A=
 dlls/d3d9/tests/visual.c |   22 +++++++++++++---------=0A=
 1 files changed, 13 insertions(+), 9 deletions(-)=0A=
=0A=
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c=0A=
index 6f184cb..7793a6c 100644=0A=
--- a/dlls/d3d9/tests/visual.c=0A=
+++ b/dlls/d3d9/tests/visual.c=0A=
@@ -7758,24 +7758,28 @@ static void =
fixed_function_bumpmap_test(IDirect3DDevice9 *device)=0A=
     hr =3D IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);=0A=
     ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);=0A=
 =0A=
+    /* on MacOS(10.5.4, radeon X1600), the white dots are have color =
0x00fbfbfb rather than 0x00ffffff. This is=0A=
+     * kinda strange since no calculations are done on the sampled =
colors, only on the texture coordinates.=0A=
+     * But since testing the color match is not the purpose of the test =
don't be too picky=0A=
+     */=0A=
     color =3D getPixelColor(device, 320-32, 240);=0A=
-    ok(color =3D=3D 0x00ffffff, "bumpmap failed: Got color 0x%08x, =
expected 0x00ffffff.\n", color);=0A=
+    ok(color_match(color, 0x00ffffff, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00ffffff.\n", color);=0A=
     color =3D getPixelColor(device, 320+32, 240);=0A=
-    ok(color =3D=3D 0x00ffffff, "bumpmap failed: Got color 0x%08x, =
expected 0x00ffffff.\n", color);=0A=
+    ok(color_match(color, 0x00ffffff, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00ffffff.\n", color);=0A=
     color =3D getPixelColor(device, 320, 240-32);=0A=
-    ok(color =3D=3D 0x00ffffff, "bumpmap failed: Got color 0x%08x, =
expected 0x00ffffff.\n", color);=0A=
+    ok(color_match(color, 0x00ffffff, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00ffffff.\n", color);=0A=
     color =3D getPixelColor(device, 320, 240+32);=0A=
-    ok(color =3D=3D 0x00ffffff, "bumpmap failed: Got color 0x%08x, =
expected 0x00ffffff.\n", color);=0A=
+    ok(color_match(color, 0x00ffffff, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00ffffff.\n", color);=0A=
     color =3D getPixelColor(device, 320, 240);=0A=
-    ok(color =3D=3D 0x00000000, "bumpmap failed: Got color 0x%08x, =
expected 0x00000000.\n", color);=0A=
+    ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00000000.\n", color);=0A=
     color =3D getPixelColor(device, 320+32, 240+32);=0A=
-    ok(color =3D=3D 0x00000000, "bumpmap failed: Got color 0x%08x, =
expected 0x00000000.\n", color);=0A=
+    ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00000000.\n", color);=0A=
     color =3D getPixelColor(device, 320-32, 240+32);=0A=
-    ok(color =3D=3D 0x00000000, "bumpmap failed: Got color 0x%08x, =
expected 0x00000000.\n", color);=0A=
+    ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00000000.\n", color);=0A=
     color =3D getPixelColor(device, 320+32, 240-32);=0A=
-    ok(color =3D=3D 0x00000000, "bumpmap failed: Got color 0x%08x, =
expected 0x00000000.\n", color);=0A=
+    ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00000000.\n", color);=0A=
     color =3D getPixelColor(device, 320-32, 240-32);=0A=
-    ok(color =3D=3D 0x00000000, "bumpmap failed: Got color 0x%08x, =
expected 0x00000000.\n", color);=0A=
+    ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color =
0x%08x, expected 0x00000000.\n", color);=0A=
 =0A=
     hr =3D IDirect3DDevice9_SetVertexDeclaration(device, NULL);=0A=
     ok(SUCCEEDED(hr), "SetVertexDeclaration failed (%08x)\n", hr);=0A=
-- =0A=
1.5.4.5=0A=
=0A=

------=_NextPart_000_0051_01C902BC.8DF85860--




More information about the wine-patches mailing list