summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/Render.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2016-10-21 21:45:29 +0000
committerGitHub <noreply@github.com>2016-10-21 21:45:29 +0000
commit2536e37ec518c8d0e949ec7780ee0fb53e8b066e (patch)
treea94415f080bbe97e7b7704d791a03d240fe282e4 /Source/Core/VideoBackends/OGL/Render.cpp
parent2fc2baf376360ff2384fc8aed618a1ddfeba6ab9 (diff)
parentab5054c34e8fc528fc5808d7f8254a6cdd89a376 (diff)
Merge pull request #4194 from Armada651/efb-source-format
PixelShaderGen: Add support for RGBA6 EFB format truncation.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index 03aa2d4fd7..3fa0cc1e66 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -1241,7 +1241,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
bool target_has_alpha = bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24;
bool useDstAlpha = bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && target_has_alpha;
- bool useDualSource = useDstAlpha && g_ActiveConfig.backend_info.bSupportsDualSourceBlend;
+ bool useDualSource = g_ActiveConfig.backend_info.bSupportsDualSourceBlend;
const GLenum glSrcFactors[8] = {
GL_ZERO,
@@ -1269,7 +1269,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
// 3-5 - srcRGB function
// 6-8 - dstRGB function
- u32 newval = useDualSource << 1;
+ u32 newval = useDstAlpha << 1;
newval |= bpmem.blendmode.subtract << 2;
if (bpmem.blendmode.subtract)
@@ -1295,7 +1295,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
{
// subtract enable change
GLenum equation = newval & 4 ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD;
- GLenum equationAlpha = useDualSource ? GL_FUNC_ADD : equation;
+ GLenum equationAlpha = useDstAlpha ? GL_FUNC_ADD : equation;
glBlendEquationSeparate(equation, equationAlpha);
}
@@ -1308,7 +1308,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
GLenum dstFactor = glDestFactors[dstidx];
// adjust alpha factors
- if (useDualSource)
+ if (useDstAlpha)
{
srcidx = BlendMode::ONE;
dstidx = BlendMode::ZERO;