d3d8/tests: Fix a test failure with Win10 WARP.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
96f37f7af9
commit
05dd1e1804
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue