d3d9/tests: Fix NP2 check.

This commit is contained in:
Matteo Bruni 2012-01-09 15:52:46 +01:00 committed by Alexandre Julliard
parent 53849b7d5e
commit 175a6d8d59
1 changed files with 12 additions and 6 deletions

View File

@ -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);