Zhiyi Zhang : d3d8/tests: Fix a test failure with Win10 WARP.
Alexandre Julliard
julliard at winehq.org
Wed Mar 18 15:42:01 CDT 2020
Module: wine
Branch: master
Commit: 05dd1e1804e91eb71218a161885feae7632ac66c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=05dd1e1804e91eb71218a161885feae7632ac66c
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Wed Mar 18 11:34:54 2020 +0800
d3d8/tests: Fix a test failure with Win10 WARP.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d8/tests/device.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index dd1e479cb2..42eee28217 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -6497,6 +6497,7 @@ out:
static void test_update_volumetexture(void)
{
+ D3DADAPTER_IDENTIFIER8 identifier;
IDirect3DDevice8 *device;
IDirect3D8 *d3d8;
HWND window;
@@ -6506,6 +6507,7 @@ static void test_update_volumetexture(void)
D3DLOCKED_BOX locked_box;
ULONG refcount;
D3DCAPS8 caps;
+ BOOL is_warp;
static const struct
{
D3DPOOL src_pool, dst_pool;
@@ -6554,6 +6556,9 @@ static void test_update_volumetexture(void)
window = create_window();
d3d8 = Direct3DCreate8(D3D_SDK_VERSION);
ok(!!d3d8, "Failed to create a D3D object.\n");
+ hr = IDirect3D8_GetAdapterIdentifier(d3d8, D3DADAPTER_DEFAULT, 0, &identifier);
+ ok(SUCCEEDED(hr), "Failed to get adapter identifier, hr %#x.\n", hr);
+ is_warp = adapter_is_warp(&identifier);
if (!(device = create_device(d3d8, window, NULL)))
{
skip("Failed to create a D3D device, skipping tests.\n");
@@ -6624,7 +6629,8 @@ static void test_update_volumetexture(void)
hr = IDirect3DDevice8_UpdateTexture(device, (IDirect3DBaseTexture8 *)src, (IDirect3DBaseTexture8 *)dst);
todo_wine_if (FAILED(hr))
- ok(SUCCEEDED(hr), "Failed to update texture, hr %#x, case %u.\n", hr, i);
+ ok(SUCCEEDED(hr) || (is_warp && (i == 6 || i == 7)), /* Fails with Win10 WARP driver */
+ "Failed to update texture, hr %#x, case %u.\n", hr, i);
IDirect3DVolumeTexture8_Release(src);
IDirect3DVolumeTexture8_Release(dst);
More information about the wine-cvs
mailing list