Remove this silliness

This commit is contained in:
Ryan Houdek 2011-12-18 01:51:15 -06:00
parent 4342efe712
commit 636d6a915d
2 changed files with 0 additions and 20 deletions

View File

@ -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_

View File

@ -938,11 +938,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
@ -950,19 +948,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];
@ -985,9 +978,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;