Stefan Dösinger : d3d9: Deal with failing surface creation.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 6 08:03:31 CDT 2007


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Jul 24 21:15:55 2007 +0200

d3d9: Deal with failing surface creation.

---

 dlls/d3d9/tests/surface.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c
index 8c82323..b209115 100644
--- a/dlls/d3d9/tests/surface.c
+++ b/dlls/d3d9/tests/surface.c
@@ -150,8 +150,11 @@ static void test_surface_alignment(IDirect3DDevice9 *device_ptr)
 
         hr = IDirect3DDevice9_CreateTexture(device_ptr, 64, 64, 0, 0, MAKEFOURCC('D', 'X', 'T', '1'+i),
                                             D3DPOOL_MANAGED, &pTexture, NULL);
-        ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateTexture: %s\n", DXGetErrorString9(hr));
-        if (FAILED(hr)) continue;
+        ok(SUCCEEDED(hr) || hr == D3DERR_INVALIDCALL, "IDirect3DDevice9_CreateTexture: %s\n", DXGetErrorString9(hr));
+        if (FAILED(hr)) {
+            skip("DXT%d surfaces are not supported\n", i + 1);
+            continue;
+        }
 
         for (j = IDirect3DBaseTexture9_GetLevelCount(pTexture) - 1; j >= 0; j--)
         {




More information about the wine-cvs mailing list