Module: wine Branch: master Commit: 7bbf29644cbf1e01603d2a123b493c19e60be923 URL: https://gitlab.winehq.org/wine/wine/-/commit/7bbf29644cbf1e01603d2a123b493c1...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Sep 7 19:45:02 2023 +0300
d3d8/tests: Fix skipping ATI2N in test_resource_access.
---
dlls/d3d8/tests/device.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index e915272b870..ae7d3b28a10 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -9727,6 +9727,7 @@ static void test_resource_access(void) D3DADAPTER_IDENTIFIER8 identifier; struct device_desc device_desc; D3DSURFACE_DESC surface_desc; + BOOL skip_ati2n_once = FALSE; IDirect3DDevice8 *device; unsigned int i, j; IDirect3D8 *d3d; @@ -9878,7 +9879,11 @@ static void test_resource_access(void) if (tests[j].format == FORMAT_ATI2 && FAILED(IDirect3D8_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0, D3DRTYPE_TEXTURE, format))) { - skip("ATI2N texture not supported.\n"); + if (!skip_ati2n_once) + { + skip("ATI2N texture not supported.\n"); + skip_ati2n_once = TRUE; + } continue; }
@@ -10034,6 +10039,17 @@ static void test_resource_access(void) else format = colour_format;
+ if (tests[i].format == FORMAT_ATI2 && FAILED(IDirect3D8_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, + D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0, D3DRTYPE_VOLUMETEXTURE, format))) + { + if (!skip_ati2n_once) + { + skip("ATI2N texture not supported.\n"); + skip_ati2n_once = TRUE; + } + continue; + } + hr = IDirect3DDevice8_CreateVolumeTexture(device, 16, 16, 1, 1, tests[i].usage, format, tests[i].pool, &texture); ok((hr == ((!(tests[i].usage & ~D3DUSAGE_DYNAMIC) && tests[i].format != FORMAT_ATI2)