=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: d3d9/tests: Create a plain DS surface in test_reset_resources.

Alexandre Julliard julliard at winehq.org
Wed Jan 16 13:47:43 CST 2013


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed Jan 16 12:44:15 2013 +0100

d3d9/tests: Create a plain DS surface in test_reset_resources.

r200 does not support depth textures.

---

 dlls/d3d9/tests/device.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index a0997d6..cabdec5 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -3523,12 +3523,9 @@ static void test_reset_resources(void)
     hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);
     ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
 
-    hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_DEPTHSTENCIL,
-            D3DFMT_D24S8, D3DPOOL_DEFAULT, &texture, NULL);
-    ok(SUCCEEDED(hr), "Failed to create depth/stencil texture, hr %#x.\n", hr);
-    hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface);
-    ok(SUCCEEDED(hr), "Failed to get surface, hr %#x.\n", hr);
-    IDirect3DTexture9_Release(texture);
+    hr = IDirect3DDevice9_CreateDepthStencilSurface(device, 128, 128,
+            D3DFMT_D24S8, D3DMULTISAMPLE_NONE, 0, TRUE, &surface, NULL);
+    ok(SUCCEEDED(hr), "Failed to create depth/stencil surface, hr %#x.\n", hr);
     hr = IDirect3DDevice9_SetDepthStencilSurface(device, surface);
     ok(SUCCEEDED(hr), "Failed to set depth/stencil surface, hr %#x.\n", hr);
     IDirect3DSurface9_Release(surface);




More information about the wine-cvs mailing list