From 175a6d8d59a8a68e85aed876299ec18f514c2fb9 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Mon, 9 Jan 2012 15:52:46 +0100 Subject: [PATCH] d3d9/tests: Fix NP2 check. --- dlls/d3d9/tests/visual.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index e92ee0d5b35..ccbbbeb18f9 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -7884,16 +7884,22 @@ static void conditional_np2_repeat_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed hr=%08x\n", hr); - if(!(caps.TextureCaps & D3DPTEXTURECAPS_POW2)) { + if (caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL) + { /* NP2 conditional requires the POW2 flag. Check that while we're at it */ - ok((caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL) == 0, - "Card has conditional NP2 support without power of two restriction set\n"); - skip("Card has unconditional pow2 support, skipping conditional NP2 tests\n"); - return; - } else if(!(caps.TextureCaps & D3DPTEXTURECAPS_POW2)) { + ok(caps.TextureCaps & D3DPTEXTURECAPS_POW2, + "Card has conditional NP2 support without power of two restriction set\n"); + } + else if (caps.TextureCaps & D3DPTEXTURECAPS_POW2) + { skip("No conditional NP2 support, skipping conditional NP2 tests\n"); return; } + else + { + skip("Card has unconditional NP2 support, skipping conditional NP2 tests\n"); + return; + } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr);