[PATCH] Disable blending on R32F and related formats. This makes the wine_todo in the visual test also unneeded.
Roderick Colenbrander
thunderbird2k at gmx.net
Sat Mar 29 09:48:15 CDT 2008
---
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;
--
1.5.3.8
--========GMX13271206877851274320--
More information about the wine-patches
mailing list