Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/surface.c:
- if (FAILED(hr))
- {
skip("Failed to create A8R8G8B8 surface, hr %#lx.\n", hr);
return;
- }
- for (i = 0; i < 2; ++i)
- {
const D3DFORMAT pma_dxt_fmt = !i ? D3DFMT_DXT2 : D3DFMT_DXT4;
const D3DFORMAT dxt_fmt = !i ? D3DFMT_DXT3 : D3DFMT_DXT5;
struct surface_readback surface_rb;
IDirect3DSurface9 *pma_surf, *surf;
IDirect3DTexture9 *pma_tex, *tex;
winetest_push_context("Test %s", !i ? "DXT2/DXT3" : "DXT4/DXT5");
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, pma_dxt_fmt, D3DPOOL_SYSTEMMEM, &pma_tex, NULL);
It seems nicer to make the test table-based, even if it's just for 2 entries, like: ``` static const struct test { D3DFORMAT pma_fmt; D3DFORMAT nonpma_fmt; const char *name; } tests[] = { { D3DFMT_DXT2, D3DFMT_DXT3, "DXT2 / DXT3" }, { D3DFMT_DXT4, D3DFMT_DXT5, "DXT4 / DXT5" }, }; ```