[PATCH] d3d9/tests: WARP returns a random color in uninitialized color attributes.

Stefan Dösinger stefan at codeweavers.com
Fri Apr 21 15:47:55 CDT 2017


ea8ba70a made the broken(warp) condition too strict. This patch reverts
back to the old behavior of accepting any result from WARP.

Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>

---

See e.g. http://test.winehq.org/data/6c7760f2175e241b330cde0a902c96d9007922e0/win8_newtb-w864-32/d3d9:visual.html .
http://test.winehq.org/data/6c7760f2175e241b330cde0a902c96d9007922e0/win8_newtb-w864-64/d3d9:visual.html is an example
where 0x00ffff00 is returned and the stricter broken() statement worked.
---
 dlls/d3d9/tests/visual.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index db29c3f..314e504 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -8087,14 +8087,13 @@ static void test_vshader_input(void)
         hr = IDirect3DDevice9_EndScene(device);
         ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
 
-        /* WARP and r500 return a color from a previous draw. In case of WARP it is the last draw, which happens to
-         * be the one with quad4_color above. AMD's r500 uses the last D3DCOLOR attribute, which is the one from
-         * quad3_color.
+        /* WARP and r500 return a color from a previous draw. In case of WARP it is random, although most of the
+         * time it is the color of the last draw, which happens to be the one with quad4_color above. AMD's r500
+         * uses the last D3DCOLOR attribute, which is the one from quad3_color.
          *
          * Newer AMD cards and Nvidia return zero. */
         color = getPixelColor(device, 160, 360);
-        ok(color_match(color, 0x00000000, 1) || broken(color_match(color, 0x00ff8040, 1))
-                || broken(color_match(color, 0x00ffff00, 1) && warp),
+        ok(color_match(color, 0x00000000, 1) || broken(color_match(color, 0x00ff8040, 1)) || broken(warp),
                 "Got unexpected color 0x%08x for no color attribute test.\n", color);
 
         IDirect3DDevice9_SetVertexShader(device, NULL);
-- 
2.10.2




More information about the wine-patches mailing list