d3dx9/tests: Take MaxVolumeExtent into account in some tests.
This commit is contained in:
parent
2a8dae52aa
commit
c1bf61e56c
|
@ -471,9 +471,9 @@ static void test_D3DXCheckVolumeTextureRequirements(IDirect3DDevice9 *device)
|
||||||
|
|
||||||
IDirect3DDevice9_GetDeviceCaps(device, &caps);
|
IDirect3DDevice9_GetDeviceCaps(device, &caps);
|
||||||
|
|
||||||
if (!(caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP))
|
if (!(caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP) || (caps.MaxVolumeExtent < 256))
|
||||||
{
|
{
|
||||||
skip("No volume textures support\n");
|
skip("Limited or no volume textures support.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ static void test_D3DXCheckVolumeTextureRequirements(IDirect3DDevice9 *device)
|
||||||
height = 143;
|
height = 143;
|
||||||
depth = 55;
|
depth = 55;
|
||||||
mipmaps = 20;
|
mipmaps = 20;
|
||||||
expected = caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP_POW2 ? 10 : 9;
|
expected = (caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP_POW2 && caps.MaxVolumeExtent >= 512) ? 10 : 9;
|
||||||
hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, &mipmaps, 0, NULL, D3DPOOL_DEFAULT);
|
hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, &mipmaps, 0, NULL, D3DPOOL_DEFAULT);
|
||||||
ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK);
|
ok(hr == D3D_OK, "D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK);
|
||||||
ok(mipmaps == expected, "Returned mipmaps %d, expected %d\n", mipmaps, expected);
|
ok(mipmaps == expected, "Returned mipmaps %d, expected %d\n", mipmaps, expected);
|
||||||
|
|
Loading…
Reference in New Issue