d3d9/tests: Accept WARP uninitialized texcoord alpha result on real cards.

My Radeon X1600 has the same behavior. This is consistent with the
vertex shader case in test_uninitialized_varyings with ps3_texcoord_code.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Stefan Dösinger 2017-04-17 22:14:57 +02:00 committed by Alexandre Julliard
parent ea8ba70ad4
commit 4e1f7b18bf
1 changed files with 6 additions and 9 deletions

View File

@ -7185,7 +7185,8 @@ static void pretransformed_varying_test(void)
const DWORD *shader_code; const DWORD *shader_code;
DWORD color; DWORD color;
BOOL todo; BOOL todo;
BOOL broken_warp; BOOL broken;
DWORD broken_color;
} }
tests[] = tests[] =
{ {
@ -7200,7 +7201,8 @@ static void pretransformed_varying_test(void)
{"depth", depth_code, 0x00cccccc, TRUE }, {"depth", depth_code, 0x00cccccc, TRUE },
{"specular", specular_code, 0x004488ff, FALSE}, {"specular", specular_code, 0x004488ff, FALSE},
{"texcoord1", texcoord1_code, 0x00000000, FALSE}, {"texcoord1", texcoord1_code, 0x00000000, FALSE},
{"texcoord1 alpha", texcoord1_alpha_code, 0x00000000, FALSE, TRUE}, /* texcoord .w is 1.0 on r500 and WARP. See also test_uninitialized_varyings(). */
{"texcoord1 alpha", texcoord1_alpha_code, 0x00000000, FALSE, TRUE, 0x00ffffff},
}; };
/* Declare a monster vertex type :-) */ /* Declare a monster vertex type :-) */
static const D3DVERTEXELEMENT9 decl_elements[] = { static const D3DVERTEXELEMENT9 decl_elements[] = {
@ -7287,7 +7289,6 @@ static void pretransformed_varying_test(void)
0x224488ff, /* Nothing special */ 0x224488ff, /* Nothing special */
}, },
}; };
D3DADAPTER_IDENTIFIER9 identifier;
IDirect3DVertexDeclaration9 *decl; IDirect3DVertexDeclaration9 *decl;
IDirect3DDevice9 *device; IDirect3DDevice9 *device;
IDirect3D9 *d3d; IDirect3D9 *d3d;
@ -7297,7 +7298,6 @@ static void pretransformed_varying_test(void)
DWORD color; DWORD color;
HWND window; HWND window;
HRESULT hr; HRESULT hr;
BOOL warp;
window = create_window(); window = create_window();
d3d = Direct3DCreate9(D3D_SDK_VERSION); d3d = Direct3DCreate9(D3D_SDK_VERSION);
@ -7317,10 +7317,6 @@ static void pretransformed_varying_test(void)
goto done; goto done;
} }
hr = IDirect3D9_GetAdapterIdentifier(d3d, D3DADAPTER_DEFAULT, 0, &identifier);
ok(SUCCEEDED(hr), "Failed to get adapter identifier, hr %#x.\n", hr);
warp = adapter_is_warp(&identifier);
hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &decl); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &decl);
ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr);
hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); hr = IDirect3DDevice9_SetVertexDeclaration(device, decl);
@ -7356,7 +7352,8 @@ static void pretransformed_varying_test(void)
"Test %s returned color 0x%08x, expected 0x%08x (todo).\n", "Test %s returned color 0x%08x, expected 0x%08x (todo).\n",
tests[i].name, color, tests[i].color); tests[i].name, color, tests[i].color);
else else
ok(color_match(color, tests[i].color, 1) || broken(warp && tests[i].broken_warp), ok(color_match(color, tests[i].color, 1)
|| broken(color_match(color, tests[i].broken_color, 1) && tests[i].broken),
"Test %s returned color 0x%08x, expected 0x%08x.\n", "Test %s returned color 0x%08x, expected 0x%08x.\n",
tests[i].name, color, tests[i].color); tests[i].name, color, tests[i].color);