=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: ddraw: Mark DepthFill blit failures between beginScene and EndScene broken.

Alexandre Julliard julliard at winehq.org
Fri Sep 2 13:13:37 CDT 2011


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Sun Aug 28 16:23:49 2011 +0200

ddraw: Mark DepthFill blit failures between beginScene and EndScene broken.

---

 dlls/ddraw/tests/d3d.c |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
index 4031a75..c799678 100644
--- a/dlls/ddraw/tests/d3d.c
+++ b/dlls/ddraw/tests/d3d.c
@@ -706,20 +706,35 @@ static void SceneTest(void)
     /* Test a normal BeginScene / EndScene pair, this should work */
     hr = IDirect3DDevice7_BeginScene(lpD3DDevice);
     ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr);
-    if(SUCCEEDED(hr))
+    if (SUCCEEDED(hr))
+    {
+        hr = IDirect3DDevice7_EndScene(lpD3DDevice);
+        ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr);
+    }
+
+    if (lpDDSdepth)
     {
         DDBLTFX fx;
         memset(&fx, 0, sizeof(fx));
         fx.dwSize = sizeof(fx);
 
-        if(lpDDSdepth) {
+        hr = IDirectDrawSurface7_Blt(lpDDSdepth, NULL, NULL, NULL, DDBLT_DEPTHFILL, &fx);
+        ok(hr == D3D_OK, "Depthfill failed outside a BeginScene / EndScene pair, hr 0x%08x\n", hr);
+
+        hr = IDirect3DDevice7_BeginScene(lpD3DDevice);
+        ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr);
+        if (SUCCEEDED(hr))
+        {
             hr = IDirectDrawSurface7_Blt(lpDDSdepth, NULL, NULL, NULL, DDBLT_DEPTHFILL, &fx);
-            ok(hr == D3D_OK, "Depthfill failed in a BeginScene / EndScene pair\n");
-        } else {
-            skip("Depth stencil creation failed at startup, skipping\n");
+            ok(hr == D3D_OK || broken(hr == E_FAIL),
+                    "Depthfill failed in a BeginScene / EndScene pair, hr 0x%08x\n", hr);
+            hr = IDirect3DDevice7_EndScene(lpD3DDevice);
+            ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr);
         }
-        hr = IDirect3DDevice7_EndScene(lpD3DDevice);
-        ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr);
+    }
+    else
+    {
+        skip("Depth stencil creation failed at startup, skipping depthfill test\n");
     }
 
     /* Test another EndScene without having begun a new scene. Should return an error */




More information about the wine-cvs mailing list