Stefan Dösinger : d3d9: AMD cards don' t clip transformed vertices.

Alexandre Julliard julliard at winehq.org
Tue May 24 12:53:49 CDT 2011


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Mon May 23 18:08:51 2011 +0200

d3d9: AMD cards don't clip transformed vertices.

---

 dlls/d3d9/tests/visual.c |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index f3ba3b4..e5c8745 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -2127,6 +2127,9 @@ static void z_range_test(IDirect3DDevice9 *device)
         {0, 0,  D3DDECLTYPE_FLOAT3,   D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
         D3DDECL_END()
     };
+
+    IDirect3DDevice9_GetDeviceCaps(device, &caps);
+
     /* Does the Present clear the depth stencil? Clear the depth buffer with some value != 0,
      * then call Present. Then clear the color buffer to make sure it has some defined content
      * after the Present with D3DSWAPEFFECT_DISCARD. After that draw a plane that is somewhere cut
@@ -2183,7 +2186,14 @@ static void z_range_test(IDirect3DDevice9 *device)
     color = getPixelColor(device, 28, 238);
     ok(color == 0x00ffffff, "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color);
     color = getPixelColor(device, 28, 241);
-    ok(color == 0x00ffffff, "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color);
+    if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_CLIPTLVERTS)
+    {
+        ok(color == 0x00ffffff, "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color);
+    }
+    else
+    {
+        ok(color == 0x00ffff00, "Z range failed: Got color 0x%08x, expected 0x00ffff00.\n", color);
+    }
 
     /* Not clipped, > z buffer clear value(0.75) */
     color = getPixelColor(device, 31, 238);
@@ -2209,13 +2219,19 @@ static void z_range_test(IDirect3DDevice9 *device)
     color = getPixelColor(device, 321, 238);
     ok(color == 0x00ffffff, "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color);
     color = getPixelColor(device, 321, 241);
-    ok(color == 0x00ffffff, "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color);
+    if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_CLIPTLVERTS)
+    {
+        ok(color == 0x00ffffff, "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color);
+    }
+    else
+    {
+        ok(color == 0x0000ff00, "Z range failed: Got color 0x%08x, expected 0x00ffffff.\n", color);
+    }
 
     hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
     ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);
 
     /* Test the shader path */
-    IDirect3DDevice9_GetDeviceCaps(device, &caps);
     if (caps.VertexShaderVersion < D3DVS_VERSION(1, 1)) {
         skip("Vertex shaders not supported\n");
         goto out;




More information about the wine-cvs mailing list