Module: wine Branch: master Commit: 73c4fbcc5120b57dc7eb00622070f3d92220ed34 URL: http://source.winehq.org/git/wine.git/?a=commit;h=73c4fbcc5120b57dc7eb006220...
Author: Stefan Dösinger stefan@codeweavers.com Date: Sun Jan 30 21:10:50 2011 +0100
d3d9: Work around an odd nvidia windows bug.
---
dlls/d3d9/tests/visual.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index d73e603..6c93bb7 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -490,6 +490,16 @@ static void clear_test(IDirect3DDevice9 *device)
IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
+ /* Hack to work around a nvidia windows driver bug. The clear below is supposed to + * clear the red quad in the top left part of the render target. For some reason it + * doesn't work if the clear color is 0xffffffff on some versions of the Nvidia Windows + * driver(tested on 8.17.12.5896, Win7). A clear with a different color works around + * this bug and fixes the clear with the white color. Even 0xfeffffff works, but let's + * pick some obvious value + */ + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xdeadbabe, 0.0, 0); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); + /* Test how the viewport affects clears */ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); @@ -626,6 +636,10 @@ static void clear_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr);
+ /* Same nvidia windows driver trouble with white clears as earlier in the same test */ + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xdeadbeef, 0.0, 0); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr);