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

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


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

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

d3d8: Only test volume textures if they are supported.

---

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

diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index e5c8997..b0d4137 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -481,8 +481,16 @@ static void test_refcount(void)
     {
         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(caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP)
+    {
+        hr = IDirect3DDevice8_CreateVolumeTexture( pDevice, 32, 32, 2, 0, 0, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &pVolumeTexture );
+        CHECK_CALL( hr, "CreateVolumeTexture", pDevice, ++refcount );
+    }
+    else
+    {
+        skip("Volume textures not supported\n");
+    }
+
     if (pVolumeTexture)
     {
         tmp = get_refcount( (IUnknown *)pVolumeTexture );




More information about the wine-cvs mailing list