[PATCH 2/4] d3d9/tests: Accept WARP uninitialized texcoord alpha result on real cards.
Stefan Dösinger
stefan at codeweavers.com
Mon Apr 17 15:14:57 CDT 2017
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 at codeweavers.com>
---
dlls/d3d9/tests/visual.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 6b5a576..db29c3f 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -7185,7 +7185,8 @@ static void pretransformed_varying_test(void)
const DWORD *shader_code;
DWORD color;
BOOL todo;
- BOOL broken_warp;
+ BOOL broken;
+ DWORD broken_color;
}
tests[] =
{
@@ -7200,7 +7201,8 @@ static void pretransformed_varying_test(void)
{"depth", depth_code, 0x00cccccc, TRUE },
{"specular", specular_code, 0x004488ff, 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 :-) */
static const D3DVERTEXELEMENT9 decl_elements[] = {
@@ -7287,7 +7289,6 @@ static void pretransformed_varying_test(void)
0x224488ff, /* Nothing special */
},
};
- D3DADAPTER_IDENTIFIER9 identifier;
IDirect3DVertexDeclaration9 *decl;
IDirect3DDevice9 *device;
IDirect3D9 *d3d;
@@ -7297,7 +7298,6 @@ static void pretransformed_varying_test(void)
DWORD color;
HWND window;
HRESULT hr;
- BOOL warp;
window = create_window();
d3d = Direct3DCreate9(D3D_SDK_VERSION);
@@ -7317,10 +7317,6 @@ static void pretransformed_varying_test(void)
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);
ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr);
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",
tests[i].name, color, tests[i].color);
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",
tests[i].name, color, tests[i].color);
--
2.10.2
More information about the wine-patches
mailing list