Stefan Dösinger : d3d9: Ignore a Windows 7 failure in the d3d9 depth clamp test.

Alexandre Julliard julliard at winehq.org
Tue Jul 6 12:33:11 CDT 2010


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Sat Jul  3 10:53:14 2010 +0200

d3d9: Ignore a Windows 7 failure in the d3d9 depth clamp test.

---

 dlls/d3d9/tests/visual.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index a17588b..c0cd79d 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -10862,6 +10862,17 @@ static void depth_clamp_test(IDirect3DDevice9 *device)
     vp.MaxZ = 7.5;
 
     hr = IDirect3DDevice9_SetViewport(device, &vp);
+    if(FAILED(hr))
+    {
+        /* Windows 7 rejects MaxZ > 1.0, Windows XP allows it. This doesn't break
+         * the tests because the 7.5 is just intended to show that it doesn't have
+         * any influence on the drawing or D3DRS_CLIPPING = FALSE. Set an accepted
+         * viewport and continue.
+         */
+        ok(broken(hr == D3DERR_INVALIDCALL), "D3D rejected maxZ > 1.0\n");
+        vp.MaxZ = 1.0;
+        hr = IDirect3DDevice9_SetViewport(device, &vp);
+    }
     ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr);
 
     hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0, 0);




More information about the wine-cvs mailing list