From 83f874db93055b3ed0cd57170603bd5ba9fc20ba Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Thu, 30 Jul 2015 19:11:38 +0200 Subject: [PATCH] gsdx-ogl: remove bsel.ps Just clear bsel.abe to disable blending --- plugins/GSdx/GSDeviceOGL.h | 6 ++---- plugins/GSdx/GSRendererOGL.cpp | 4 ++-- plugins/GSdx/GSTextureFXOGL.cpp | 9 --------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/plugins/GSdx/GSDeviceOGL.h b/plugins/GSdx/GSDeviceOGL.h index 71fb0cc771..a5d9d3805b 100644 --- a/plugins/GSdx/GSDeviceOGL.h +++ b/plugins/GSdx/GSDeviceOGL.h @@ -452,9 +452,8 @@ class GSDeviceOGL : public GSDevice uint32 d:2; uint32 negative:1; uint32 accu:1; - uint32 ps:1; - uint32 _free:20; + uint32 _free:21; }; struct @@ -463,9 +462,8 @@ class GSDeviceOGL : public GSDevice uint32 abcd:8; uint32 _negative:1; uint32 _accu:1; - uint32 _ps:1; - uint32 _free2:20; + uint32 _free2:21; }; uint32 key; diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 91f6b3c8e8..0ca0cadcd6 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -409,8 +409,8 @@ bool GSRendererOGL::EmulateBlending(GSDeviceOGL::PSSelector& ps_sel, GSDeviceOGL om_bsel.a, om_bsel.b, om_bsel.c, om_bsel.d, m_env.COLCLAMP.CLAMP, m_vt.m_primclass, m_vertex.next, sw_blending); #endif if (sw_blending) { - // select a shader that support blending - om_bsel.ps = 1; + // Disable HW blending except in accu mode + om_bsel.abe = ps_sel.blend_accu; ps_sel.blend_a = om_bsel.a; ps_sel.blend_b = om_bsel.b; ps_sel.blend_c = om_bsel.c; diff --git a/plugins/GSdx/GSTextureFXOGL.cpp b/plugins/GSdx/GSTextureFXOGL.cpp index 2715e0d431..9a9e1f688e 100644 --- a/plugins/GSdx/GSTextureFXOGL.cpp +++ b/plugins/GSdx/GSTextureFXOGL.cpp @@ -197,15 +197,6 @@ void GSDeviceOGL::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, fl OMSetDepthStencilState(dss, 1); - if (bsel.ps && !bsel.accu) { - if (GLState::blend) { - GLState::blend = false; - glDisable(GL_BLEND); - } - // No hardware blending thank - return; - } - // ************************************************************* // Static // *************************************************************