aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/blend.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-09-09 14:14:42 -0700
committerIan Romanick <[email protected]>2011-09-19 12:02:20 -0700
commit113e8167de4500ea8b12176a938cbc4753f3a923 (patch)
treef58b3776805554cde05fdcc406af0ced5dc2c895 /src/mesa/main/blend.c
parent3538bffa7287ebef5f2dc4d2e4491aaf6e68b09e (diff)
mesa: Remove support for GL_EXT_blend_logic_op
Support is removed for four reasons: 1. The implementation was broken with respect to separate blend equations. The GL_EXT_blend_equation_separate spec says: "If EXT_blend_logic_op and EXT_blend_equation_separate are both supported, the logic op blend equation should be supported separately for RGB and alpha as with the other blend equation modes." But Mesa's implementation of GL_LOGIC_OP specifically forbids this. 2. No hardware supported by Mesa can support separate blend equations involving GL_LOGIC_OP. 3. No applications could be found that use this extension. 4. No other Linux OpenGL drivers support this extension. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/blend.c')
-rw-r--r--src/mesa/main/blend.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 4214a661bb8..4dcc0b9d2a3 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -285,8 +285,7 @@ _mesa_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB,
* \return GL_TRUE if legal, GL_FALSE otherwise.
*/
static GLboolean
-legal_blend_equation(const struct gl_context *ctx,
- GLenum mode, GLboolean is_separate)
+legal_blend_equation(const struct gl_context *ctx, GLenum mode)
{
switch (mode) {
case GL_FUNC_ADD:
@@ -294,10 +293,6 @@ legal_blend_equation(const struct gl_context *ctx,
case GL_MIN:
case GL_MAX:
return ctx->Extensions.EXT_blend_minmax;
- case GL_LOGIC_OP:
- /* glBlendEquationSeparate cannot take GL_LOGIC_OP as a parameter.
- */
- return ctx->Extensions.EXT_blend_logic_op && !is_separate;
case GL_FUNC_SUBTRACT:
case GL_FUNC_REVERSE_SUBTRACT:
return ctx->Extensions.EXT_blend_subtract;
@@ -320,7 +315,7 @@ _mesa_BlendEquation( GLenum mode )
_mesa_debug(ctx, "glBlendEquation(%s)\n",
_mesa_lookup_enum_by_nr(mode));
- if (!legal_blend_equation(ctx, mode, GL_FALSE)) {
+ if (!legal_blend_equation(ctx, mode)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation");
return;
}
@@ -370,7 +365,7 @@ _mesa_BlendEquationi(GLuint buf, GLenum mode)
return;
}
- if (!legal_blend_equation(ctx, mode, GL_FALSE)) {
+ if (!legal_blend_equation(ctx, mode)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationi");
return;
}
@@ -408,12 +403,12 @@ _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA )
return;
}
- if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) {
+ if (!legal_blend_equation(ctx, modeRGB)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeRGB)");
return;
}
- if (!legal_blend_equation(ctx, modeA, GL_TRUE)) {
+ if (!legal_blend_equation(ctx, modeA)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeA)");
return;
}
@@ -464,12 +459,12 @@ _mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA)
return;
}
- if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) {
+ if (!legal_blend_equation(ctx, modeRGB)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeRGB)");
return;
}
- if (!legal_blend_equation(ctx, modeA, GL_TRUE)) {
+ if (!legal_blend_equation(ctx, modeA)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeA)");
return;
}