Stefan Dösinger : d3d8: Only test cube textures if they are supported.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 30 16:52:33 CDT 2007


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

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

d3d8: Only test cube textures if they are supported.

---

 dlls/d3d8/tests/device.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index bc9c804..e5c8997 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -472,8 +472,15 @@ static void test_refcount(void)
             CHECK_REFCOUNT        ( pTextureLevel, tmp   );
         }
     }
-    hr = IDirect3DDevice8_CreateCubeTexture( pDevice, 32, 0, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &pCubeTexture );
-    CHECK_CALL( hr, "CreateCubeTexture", pDevice, ++refcount );
+    if(caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP)
+    {
+        hr = IDirect3DDevice8_CreateCubeTexture( pDevice, 32, 0, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &pCubeTexture );
+        CHECK_CALL( hr, "CreateCubeTexture", pDevice, ++refcount );
+    }
+    else
+    {
+        skip("Cube textures not supported\n");
+    }
     hr = IDirect3DDevice8_CreateVolumeTexture( pDevice, 32, 32, 2, 0, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &pVolumeTexture );
     CHECK_CALL( hr, "CreateVolumeTexture", pDevice, ++refcount );
     if (pVolumeTexture)




More information about the wine-cvs mailing list