summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2019-10-22 19:27:53 -0400
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-11-08 12:15:39 +0000
commit07ca100130111168bcb476c28d5cf115f8d42283 (patch)
tree6d4f28e2aa0efcc913989385f82e0faf5e7aa03f
parent6944839ab68845cfd41d9d1ef6aad0faf40464c6 (diff)
downloadmutter-07ca100130111168bcb476c28d5cf115f8d42283.tar.gz
cogl: glBlendEquationSeparate is always available
So we don't need glBlendEquation. https://gitlab.gnome.org/GNOME/mutter/merge_requests/903
-rw-r--r--cogl/cogl/cogl-blend-string.c10
-rw-r--r--cogl/cogl/driver/gl/cogl-pipeline-opengl.c10
-rw-r--r--cogl/cogl/gl-prototypes/cogl-in-gles2-core-functions.h2
3 files changed, 2 insertions, 20 deletions
diff --git a/cogl/cogl/cogl-blend-string.c b/cogl/cogl/cogl-blend-string.c
index b109df1ba..7acaddd07 100644
--- a/cogl/cogl/cogl-blend-string.c
+++ b/cogl/cogl/cogl-blend-string.c
@@ -216,16 +216,6 @@ validate_blend_statements (CoglBlendStringStatement *statements,
_COGL_GET_CONTEXT (ctx, 0);
- if (n_statements == 2 &&
- !ctx->glBlendEquationSeparate &&
- statements[0].function->type != statements[1].function->type)
- {
- error_string = "Separate blend functions for the RGB an A "
- "channels isn't supported by the driver";
- detail = COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR;
- goto error;
- }
-
for (i = 0; i < n_statements; i++)
for (j = 0; j < statements[i].function->argc; j++)
{
diff --git a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
index 6dba54796..c764c054f 100644
--- a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -495,14 +495,8 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
GE (ctx, glBlendColor (red, green, blue, alpha));
}
- if (ctx->glBlendEquationSeparate &&
- blend_state->blend_equation_rgb !=
- blend_state->blend_equation_alpha)
- GE (ctx,
- glBlendEquationSeparate (blend_state->blend_equation_rgb,
- blend_state->blend_equation_alpha));
- else
- GE (ctx, glBlendEquation (blend_state->blend_equation_rgb));
+ GE (ctx, glBlendEquationSeparate (blend_state->blend_equation_rgb,
+ blend_state->blend_equation_alpha));
if (ctx->glBlendFuncSeparate &&
(blend_state->blend_src_factor_rgb !=
diff --git a/cogl/cogl/gl-prototypes/cogl-in-gles2-core-functions.h b/cogl/cogl/gl-prototypes/cogl-in-gles2-core-functions.h
index 1e2f79ea4..33bb4450a 100644
--- a/cogl/cogl/gl-prototypes/cogl-in-gles2-core-functions.h
+++ b/cogl/cogl/gl-prototypes/cogl-in-gles2-core-functions.h
@@ -121,8 +121,6 @@ COGL_EXT_BEGIN (blending, 1, 2,
COGL_EXT_IN_GLES2,
"\0",
"\0")
-COGL_EXT_FUNCTION (void, glBlendEquation,
- (GLenum mode))
COGL_EXT_FUNCTION (void, glBlendColor,
(GLclampf red,
GLclampf green,