Commit d6a919af authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dx9/tests: Skip a test if DXTn texture formats are not supported.

parent d96d0af8
......@@ -341,7 +341,9 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
ok(format == expected, "Returned format %u, expected %u\n", format, expected);
/* Block-based texture formats and size < block size. */
format = D3DFMT_DXT1;
if (has_2d_dxt5)
{
format = D3DFMT_DXT5;
width = 2; height = 2;
mipmaps = 1;
hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT);
......@@ -349,7 +351,12 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
ok(width == 4, "Returned width %d, expected %d\n", width, 4);
ok(height == 4, "Returned height %d, expected %d\n", height, 4);
ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1);
ok(format == D3DFMT_DXT1, "Returned format %u, expected %u\n", format, D3DFMT_DXT1);
ok(format == D3DFMT_DXT5, "Returned format %u, expected %u\n", format, D3DFMT_DXT5);
}
else
{
skip("D3DFMT_DXT5 textures are not supported, skipping a test.\n");
}
IDirect3D9_Release(d3d);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment