From 7f5f92a40554026eda976d9a99b86911ade2714f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sat, 3 Jul 2010 15:54:39 +0200 Subject: [PATCH 04/12] d3d9: Accept the d3d10 fog+sRGB behavior as broken The HL2 fog bug went away with driver updates, so dx10 drivers are using a special quirk for HL2. Wine keeps the dx9 behavior on all cards, this patch makes the test shut up on dx10 cards on Windows. --- dlls/d3d9/tests/visual.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 19a74b3..c4bfa44 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -7043,6 +7043,10 @@ static void fog_srgbwrite_test(IDirect3DDevice9 *device) * * At the time of this writing, wined3d could not apply sRGB correction to fixed function rendering, * so use shaders for this task + * + * DirectX9 cards return 0.5, DirectX10 cards return 0.73. Some games(Half Life 2 based ones + * specifically) need the DX9 behavior. DX10 Windows drivers apparently have a quirk for HL2. Wine + * emulates the DX9 behavior, this tests accepts the DX10 behavior with broken(). */ IDirect3DPixelShader9 *pshader; IDirect3DVertexShader9 *vshader; @@ -7134,7 +7138,7 @@ static void fog_srgbwrite_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); color = getPixelColor(device, 160, 360); - ok(color_match(color, 0x00808080, 1), + ok(color_match(color, 0x00808080, 1) || broken(color_match(color, 0x00bcbcbc, 1)), "Fog with D3DRS_SRGBWRITEENABLE returned color 0x%08x, expected 0x00808080\n", color); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); -- 1.6.4.4