From d96d0af83d9be0cf27dcf45536fdcd5939ae04a6 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Thu, 13 Mar 2014 16:31:07 +0100 Subject: [PATCH] d3dx9/tests: Skip some volume tests if loading the texture fails. --- dlls/d3dx9_36/tests/volume.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/tests/volume.c b/dlls/d3dx9_36/tests/volume.c index ee83bca410c..860a20bdbee 100644 --- a/dlls/d3dx9_36/tests/volume.c +++ b/dlls/d3dx9_36/tests/volume.c @@ -73,7 +73,7 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) &volume_texture, NULL); if (FAILED(hr)) { - skip("Failed to create volume texture\n"); + skip("Failed to create volume texture.\n"); return; } @@ -84,6 +84,11 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 16, NULL, &src_box, D3DX_DEFAULT, 0); ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + if (FAILED(hr)) + { + win_skip("D3DXLoadVolumeFromMemory failed with error %#x, skipping some tests.\n", hr); + return; + } IDirect3DVolume9_LockBox(volume, &locked_box, &dst_box, D3DLOCK_READONLY); for (i = 0; i < 16; i++) check_pixel_4bpp(&locked_box, i % 4, 0, i / 4, pixels[i]);