diff options
| author | Jules Blok <jules.blok@gmail.com> | 2016-10-29 17:24:10 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2016-10-29 18:00:22 +0200 |
| commit | ce9f717045ef551d1cf58166f52034d40b4ceb6e (patch) | |
| tree | f3a30551d96ea196201ea59b1270ee2c6eef36b7 /Source/Core/VideoBackends/OGL/Render.cpp | |
| parent | 41563c55cd56cbdaf245cf4ee26ca49a27861395 (diff) | |
OGL: Fall back to the old dual-source blending behaviour.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/Render.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index f1e263d8db..ab6576915e 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -445,8 +445,7 @@ Renderer::Renderer() g_Config.backend_info.bSupportsDualSourceBlend = (GLExtensions::Supports("GL_ARB_blend_func_extended") || - GLExtensions::Supports("GL_EXT_blend_func_extended")) && - !DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DUAL_SOURCE_BLENDING); + GLExtensions::Supports("GL_EXT_blend_func_extended")); g_Config.backend_info.bSupportsPrimitiveRestart = !DriverDetails::HasBug(DriverDetails::BUG_PRIMITIVERESTART) && ((GLExtensions::Version() >= 310) || GLExtensions::Supports("GL_NV_primitive_restart")); @@ -1244,6 +1243,10 @@ void Renderer::SetBlendMode(bool forceUpdate) bool useDstAlpha = bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && target_has_alpha; bool useDualSource = g_ActiveConfig.backend_info.bSupportsDualSourceBlend; + // Only use dual-source blending when required on drivers that don't support it very well. + if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DUAL_SOURCE_BLENDING) && !useDstAlpha) + useDualSource = false; + const GLenum glSrcFactors[8] = { GL_ZERO, GL_ONE, |
