Module: wine Branch: master Commit: 76014205de3cbd73fe761db8f86fcdb178bb0189 URL: http://source.winehq.org/git/wine.git/?a=commit;h=76014205de3cbd73fe761db8f8...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Sat Mar 29 14:48:15 2008 +0000
wined3d: Fix a postpixelshader_blending bug.
---
dlls/d3d9/tests/visual.c | 2 +- dlls/wined3d/state.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 8916649..a129621 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -7857,7 +7857,7 @@ static void pixelshader_blending_test(IDirect3DDevice9 *device) * reports. On Vista Nvidia seems to report 0x00ffffff on Geforce7 cards. */ color = getPixelColor(device, 320, 240); trace("[No blending] %s: expected %x or 0x00ffffff, result=%x\n", test_formats[fmt_index].fmtName, test_formats[fmt_index].resultColorNoBlending, color); - todo_wine ok((color == 0x00ffffff) || (color == test_formats[fmt_index].resultColorNoBlending), "Offscreen failed for %s: expected garbage but color %#08x, matches the result we would have with blending. (todo)\n", test_formats[fmt_index].fmtName, color); + ok((color == 0x00ffffff) || (color == test_formats[fmt_index].resultColorNoBlending), "Offscreen failed for %s: expected no color blending but received it anyway.\n", test_formats[fmt_index].fmtName); }
IDirect3DDevice9_SetTexture(device, 0, NULL); diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 1718273..8a8a634 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -246,8 +246,9 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D const GlPixelFormatDesc *glDesc; getFormatDescEntry(target->resource.format, &GLINFO_LOCATION, &glDesc);
- /* When pixel shaders are used on a format that doesn't offer blending, disable blending else we could face a big performance penalty. */ - if(!(glDesc->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) && use_ps(stateblock->wineD3DDevice)) { + /* Disable blending in all cases even without pixelshaders. With blending on we could face a big performance penalty. + * The d3d9 visual test confirms the behavior. */ + if(!(glDesc->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) { glDisable(GL_BLEND); checkGLcall("glDisable GL_BLEND"); return;