[mutter] cogl: glBlendEquationSeparate is always available



commit 07ca100130111168bcb476c28d5cf115f8d42283
Author: Adam Jackson <ajax redhat com>
Date:   Tue Oct 22 19:27:53 2019 -0400

    cogl: glBlendEquationSeparate is always available
    
    So we don't need glBlendEquation.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/903

 cogl/cogl/cogl-blend-string.c                          | 10 ----------
 cogl/cogl/driver/gl/cogl-pipeline-opengl.c             | 10 ++--------
 cogl/cogl/gl-prototypes/cogl-in-gles2-core-functions.h |  2 --
 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]