Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/texture.c:
* volume texture file.
*/
- hr = D3DXCreateTextureFromFileInMemory(device, dds_volume_dxt3_4_4_4, sizeof(dds_volume_dxt3_4_4_4), &texture);
- ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#lx, expected %#lx.\n", hr, D3D_OK);
- check_texture_mips(texture, 3, TRUE);
- if (has_2d_dxt3)
- {
struct surface_readback surface_rb;
uint32_t mip_level;
check_texture_level_desc(texture, 0, D3DFMT_DXT3, 0, D3DPOOL_MANAGED, 0, 0, 4, 4, FALSE);
check_texture_level_desc(texture, 1, D3DFMT_DXT3, 0, D3DPOOL_MANAGED, 0, 0, 2, 2, TRUE);
check_texture_level_desc(texture, 2, D3DFMT_DXT3, 0, D3DPOOL_MANAGED, 0, 0, 1, 1, TRUE);
for (mip_level = 0; mip_level < 3; ++mip_level)
{
const uint32_t expected_color[3] = { 0xffff0000, 0xff00ff00, 0xff0000ff };
This could be static as well (mostly for consistency with the other "expected" arrays).
Another potential tiny improvement could be to move (and rename) `expected_color[]` to the top of the function and then use `ARRAY_SIZE()` as upper bound for the loop.