mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07: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;
|
||||
#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_
|
||||
|
@ -935,11 +935,9 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||
|
||||
u32 changes = forceUpdate ? 0xFFFFFFFF : newval ^ s_blendMode;
|
||||
|
||||
#ifdef USE_DUAL_SOURCE_BLEND
|
||||
bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate
|
||||
&& bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 && g_ActiveConfig.bUseGLSL;
|
||||
bool useDualSource = useDstAlpha;
|
||||
#endif
|
||||
|
||||
if (changes & 1)
|
||||
// blend enable change
|
||||
@ -947,19 +945,14 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||
|
||||
if (changes & 4)
|
||||
{
|
||||
#ifdef USE_DUAL_SOURCE_BLEND
|
||||
// subtract enable change
|
||||
GLenum equation = newval & 4 ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD;
|
||||
GLenum equationAlpha = useDualSource ? GL_FUNC_ADD : equation;
|
||||
glBlendEquationSeparate(equation, equationAlpha);
|
||||
#else
|
||||
glBlendEquation(newval & 4 ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (changes & 0x1F8)
|
||||
{
|
||||
#ifdef USE_DUAL_SOURCE_BLEND
|
||||
GLenum srcFactor = glSrcFactors[(newval >> 3) & 7];
|
||||
GLenum srcFactorAlpha = srcFactor;
|
||||
GLenum dstFactor = glDestFactors[(newval >> 6) & 7];
|
||||
@ -982,9 +975,6 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||
|
||||
// blend RGB change
|
||||
glBlendFuncSeparate(srcFactor, dstFactor, srcFactorAlpha, dstFactorAlpha);
|
||||
#else
|
||||
glBlendFunc(glSrcFactors[(newval >> 3) & 7], glDestFactors[(newval >> 6) & 7]);
|
||||
#endif
|
||||
}
|
||||
|
||||
s_blendMode = newval;
|
||||
|
Loading…
Reference in New Issue
Block a user