Module: wine Branch: master Commit: b14d7f2fa865f820e2156213d640956985f41fec URL: https://gitlab.winehq.org/wine/wine/-/commit/b14d7f2fa865f820e2156213d640956...
Author: Stefan Dösinger stefan@codeweavers.com Date: Sat Sep 9 16:15:42 2023 +0300
d3d9/tests: Fix skipping ATI2N in test_resource_access.
---
dlls/d3d9/tests/device.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 85d72fff8f7..a90e6a3a7a4 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -13584,6 +13584,7 @@ static void test_resource_access(void) D3DADAPTER_IDENTIFIER9 identifier; struct device_desc device_desc; D3DSURFACE_DESC surface_desc; + BOOL skip_ati2n_once = FALSE; IDirect3DDevice9 *device; unsigned int i, j; IDirect3D9 *d3d; @@ -13735,7 +13736,11 @@ static void test_resource_access(void) if (tests[j].format == FORMAT_ATI2 && FAILED(IDirect3D9_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; }
@@ -13893,6 +13898,17 @@ static void test_resource_access(void) else format = colour_format;
+ if (tests[i].format == FORMAT_ATI2 && FAILED(IDirect3D9_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 = IDirect3DDevice9_CreateVolumeTexture(device, 16, 16, 1, 1, tests[i].usage, format, tests[i].pool, &texture, NULL); ok((hr == (!(tests[i].usage & ~D3DUSAGE_DYNAMIC)