mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
Remove this silliness
This commit is contained in:
parent
9c09e1973a
commit
66a245dd68
@ -121,14 +121,4 @@ extern CGcontext g_cgcontext;
|
|||||||
extern CGprofile g_cgvProf, g_cgfProf;
|
extern CGprofile g_cgvProf, g_cgfProf;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// XXX: Dual-source blending in OpenGL does not work correctly yet. To make it
|
|
||||||
// work, we may need to use glBindFragDataLocation. To use that, we need to
|
|
||||||
// use GLSL shaders across the whole pipeline. Yikes!
|
|
||||||
#define USE_DUAL_SOURCE_BLEND
|
|
||||||
|
|
||||||
// Can't get defined on my system for some reason...
|
|
||||||
#ifndef GL_ONE_MINUS_SRC1_ALPHA
|
|
||||||
#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _GLINIT_H_
|
#endif // _GLINIT_H_
|
||||||
|
@ -935,11 +935,9 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
|||||||
|
|
||||||
u32 changes = forceUpdate ? 0xFFFFFFFF : newval ^ s_blendMode;
|
u32 changes = forceUpdate ? 0xFFFFFFFF : newval ^ s_blendMode;
|
||||||
|
|
||||||
#ifdef USE_DUAL_SOURCE_BLEND
|
|
||||||
bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate
|
bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate
|
||||||
&& bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 && g_ActiveConfig.bUseGLSL;
|
&& bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 && g_ActiveConfig.bUseGLSL;
|
||||||
bool useDualSource = useDstAlpha;
|
bool useDualSource = useDstAlpha;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (changes & 1)
|
if (changes & 1)
|
||||||
// blend enable change
|
// blend enable change
|
||||||
@ -947,19 +945,14 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
|||||||
|
|
||||||
if (changes & 4)
|
if (changes & 4)
|
||||||
{
|
{
|
||||||
#ifdef USE_DUAL_SOURCE_BLEND
|
|
||||||
// subtract enable change
|
// subtract enable change
|
||||||
GLenum equation = newval & 4 ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD;
|
GLenum equation = newval & 4 ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD;
|
||||||
GLenum equationAlpha = useDualSource ? GL_FUNC_ADD : equation;
|
GLenum equationAlpha = useDualSource ? GL_FUNC_ADD : equation;
|
||||||
glBlendEquationSeparate(equation, equationAlpha);
|
glBlendEquationSeparate(equation, equationAlpha);
|
||||||
#else
|
|
||||||
glBlendEquation(newval & 4 ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changes & 0x1F8)
|
if (changes & 0x1F8)
|
||||||
{
|
{
|
||||||
#ifdef USE_DUAL_SOURCE_BLEND
|
|
||||||
GLenum srcFactor = glSrcFactors[(newval >> 3) & 7];
|
GLenum srcFactor = glSrcFactors[(newval >> 3) & 7];
|
||||||
GLenum srcFactorAlpha = srcFactor;
|
GLenum srcFactorAlpha = srcFactor;
|
||||||
GLenum dstFactor = glDestFactors[(newval >> 6) & 7];
|
GLenum dstFactor = glDestFactors[(newval >> 6) & 7];
|
||||||
@ -982,9 +975,6 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
|||||||
|
|
||||||
// blend RGB change
|
// blend RGB change
|
||||||
glBlendFuncSeparate(srcFactor, dstFactor, srcFactorAlpha, dstFactorAlpha);
|
glBlendFuncSeparate(srcFactor, dstFactor, srcFactorAlpha, dstFactorAlpha);
|
||||||
#else
|
|
||||||
glBlendFunc(glSrcFactors[(newval >> 3) & 7], glDestFactors[(newval >> 6) & 7]);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s_blendMode = newval;
|
s_blendMode = newval;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user