wined3d: Fix a postpixelshader_blending bug.
This commit is contained in:
parent
529f25dc60
commit
76014205de
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue