From fd896bd9e051dd29b4186e6b028067ecade4b515 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 18 Apr 2017 21:45:03 +1000 Subject: [PATCH] OGL: Drop BlendingState.dither How GL_DITHER works is implementation-defined, and we handle the non-blended case in the pixel shader. --- Source/Core/VideoBackends/OGL/Render.cpp | 5 ----- Source/Core/VideoCommon/RenderState.cpp | 1 - Source/Core/VideoCommon/RenderState.h | 11 +++++------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 4663c2d6ac..ec68c14f23 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -1274,11 +1274,6 @@ void Renderer::SetBlendMode(bool forceUpdate) glDisable(GL_COLOR_LOGIC_OP); } - if (state.dither) - glEnable(GL_DITHER); - else - glDisable(GL_DITHER); - glColorMask(state.colorupdate, state.colorupdate, state.colorupdate, state.alphaupdate); } diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp index 04c476e8da..696574f109 100644 --- a/Source/Core/VideoCommon/RenderState.cpp +++ b/Source/Core/VideoCommon/RenderState.cpp @@ -61,7 +61,6 @@ void BlendingState::Generate(const BPMemory& bp) bool target_has_alpha = bp.zcontrol.pixel_format == PEControl::RGBA6_Z24; bool alpha_test_may_success = bp.alpha_test.TestResult() != AlphaTest::FAIL; - dither = bp.blendmode.dither; colorupdate = bp.blendmode.colorupdate && alpha_test_may_success; alphaupdate = bp.blendmode.alphaupdate && target_has_alpha && alpha_test_may_success; dstalpha = bp.dstalpha.enable && alphaupdate; diff --git a/Source/Core/VideoCommon/RenderState.h b/Source/Core/VideoCommon/RenderState.h index 60bc37e6aa..25a55ba17a 100644 --- a/Source/Core/VideoCommon/RenderState.h +++ b/Source/Core/VideoCommon/RenderState.h @@ -16,17 +16,16 @@ union BlendingState BitField<0, 1, u32> blendenable; BitField<1, 1, u32> logicopenable; BitField<2, 1, u32> dstalpha; - BitField<3, 1, u32> dither; - BitField<4, 1, u32> colorupdate; - BitField<5, 1, u32> alphaupdate; - BitField<6, 1, u32> subtract; - BitField<7, 1, u32> subtractAlpha; + BitField<3, 1, u32> colorupdate; + BitField<4, 1, u32> alphaupdate; + BitField<5, 1, u32> subtract; + BitField<6, 1, u32> subtractAlpha; + BitField<7, 1, u32> usedualsrc; BitField<8, 3, BlendMode::BlendFactor> dstfactor; BitField<11, 3, BlendMode::BlendFactor> srcfactor; BitField<14, 3, BlendMode::BlendFactor> dstfactoralpha; BitField<17, 3, BlendMode::BlendFactor> srcfactoralpha; BitField<20, 4, BlendMode::LogicOp> logicmode; - BitField<24, 1, u32> usedualsrc; u32 hex; };