D3D+OGL: choose blendenable over logicopenable.
No sane game should turn on both logicopenable and blendenable in the same blend mode, but not every game is sane. Fixes issue 6009.
This commit is contained in:
parent
7b5b76caa4
commit
31bcdb8f2f
|
@ -615,7 +615,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||||
(target_has_alpha) ? D3D11_BLEND_INV_DEST_ALPHA : D3D11_BLEND_ZERO
|
(target_has_alpha) ? D3D11_BLEND_INV_DEST_ALPHA : D3D11_BLEND_ZERO
|
||||||
};
|
};
|
||||||
|
|
||||||
if (bpmem.blendmode.logicopenable && !forceUpdate)
|
if (bpmem.blendmode.logicopenable && !bpmem.blendmode.blendenable && !forceUpdate)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (bpmem.blendmode.subtract)
|
if (bpmem.blendmode.subtract)
|
||||||
|
@ -1234,7 +1234,7 @@ void Renderer::SetLogicOpMode()
|
||||||
D3D11_BLEND_ONE//15
|
D3D11_BLEND_ONE//15
|
||||||
};
|
};
|
||||||
|
|
||||||
if (bpmem.blendmode.logicopenable)
|
if (bpmem.blendmode.logicopenable && !bpmem.blendmode.blendenable)
|
||||||
{
|
{
|
||||||
gx_state.blend.blend_enable = true;
|
gx_state.blend.blend_enable = true;
|
||||||
gx_state.blend.blend_op = d3dLogicOps[bpmem.blendmode.logicmode];
|
gx_state.blend.blend_op = d3dLogicOps[bpmem.blendmode.logicmode];
|
||||||
|
|
|
@ -1882,7 +1882,7 @@ void Renderer::SetLogicOpMode()
|
||||||
GL_SET
|
GL_SET
|
||||||
};
|
};
|
||||||
|
|
||||||
if (bpmem.blendmode.logicopenable)
|
if (bpmem.blendmode.logicopenable && !bpmem.blendmode.blendenable)
|
||||||
{
|
{
|
||||||
glEnable(GL_COLOR_LOGIC_OP);
|
glEnable(GL_COLOR_LOGIC_OP);
|
||||||
glLogicOp(glLogicOpCodes[bpmem.blendmode.logicmode]);
|
glLogicOp(glLogicOpCodes[bpmem.blendmode.logicmode]);
|
||||||
|
|
Loading…
Reference in New Issue