[mutter] cogl: Remove always-set COGL_PRIVATE_FEATURE_BLEND_CONSTANT



commit 7716a418cea4ed86775819949bff0eb9fa0dfa36
Author: Adam Jackson <ajax redhat com>
Date:   Thu Oct 17 16:56:37 2019 -0400

    cogl: Remove always-set COGL_PRIVATE_FEATURE_BLEND_CONSTANT
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/866

 cogl/cogl/cogl-blend-string.c               | 11 -----------
 cogl/cogl/cogl-pipeline-state.c             |  3 ---
 cogl/cogl/cogl-private.h                    |  1 -
 cogl/cogl/driver/gl/gl/cogl-driver-gl.c     |  3 ---
 cogl/cogl/driver/gl/gles/cogl-driver-gles.c |  3 ---
 5 files changed, 21 deletions(-)
---
diff --git a/cogl/cogl/cogl-blend-string.c b/cogl/cogl/cogl-blend-string.c
index ec5ae7e8e..b109df1ba 100644
--- a/cogl/cogl/cogl-blend-string.c
+++ b/cogl/cogl/cogl-blend-string.c
@@ -245,17 +245,6 @@ validate_blend_statements (CoglBlendStringStatement *statements,
                            "for arg0 and DST_COLOR for arg1";
             goto error;
           }
-
-        if (!_cogl_has_private_feature (ctx,
-                                        COGL_PRIVATE_FEATURE_BLEND_CONSTANT) &&
-            arg->factor.is_color &&
-            (arg->factor.source.info->type ==
-             COGL_BLEND_STRING_COLOR_SOURCE_CONSTANT))
-          {
-            error_string = "Driver doesn't support constant blend factors";
-            detail = COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR;
-            goto error;
-          }
       }
 
   return TRUE;
diff --git a/cogl/cogl/cogl-pipeline-state.c b/cogl/cogl/cogl-pipeline-state.c
index f536899f0..8911ae1f0 100644
--- a/cogl/cogl/cogl-pipeline-state.c
+++ b/cogl/cogl/cogl-pipeline-state.c
@@ -1014,9 +1014,6 @@ cogl_pipeline_set_blend_constant (CoglPipeline *pipeline,
 
   g_return_if_fail (cogl_is_pipeline (pipeline));
 
-  if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_BLEND_CONSTANT))
-    return;
-
 #if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
   {
     CoglPipelineState state = COGL_PIPELINE_STATE_BLEND;
diff --git a/cogl/cogl/cogl-private.h b/cogl/cogl/cogl-private.h
index ccbe2a113..12e16233b 100644
--- a/cogl/cogl/cogl-private.h
+++ b/cogl/cogl/cogl-private.h
@@ -52,7 +52,6 @@ typedef enum
   COGL_PRIVATE_FEATURE_READ_PIXELS_ANY_FORMAT,
   COGL_PRIVATE_FEATURE_ALPHA_TEST,
   COGL_PRIVATE_FEATURE_FORMAT_CONVERSION,
-  COGL_PRIVATE_FEATURE_BLEND_CONSTANT,
   COGL_PRIVATE_FEATURE_QUERY_FRAMEBUFFER_BITS,
   COGL_PRIVATE_FEATURE_BUILTIN_POINT_SIZE_UNIFORM,
   COGL_PRIVATE_FEATURE_QUERY_TEXTURE_PARAMETERS,
diff --git a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
index 07522477a..cd90f2e9e 100644
--- a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
+++ b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
@@ -436,8 +436,6 @@ _cogl_driver_update_features (CoglContext *ctx,
     }
 
   COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_PBOS, TRUE);
-  COGL_FLAGS_SET (private_features,
-                  COGL_PRIVATE_FEATURE_BLEND_CONSTANT, TRUE);
 
   flags |= COGL_FEATURE_POINT_SPRITE;
   COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_POINT_SPRITE, TRUE);
@@ -483,7 +481,6 @@ _cogl_driver_update_features (CoglContext *ctx,
   COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ANY_GL, TRUE);
   COGL_FLAGS_SET (private_features,
                   COGL_PRIVATE_FEATURE_FORMAT_CONVERSION, TRUE);
-  COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_BLEND_CONSTANT, TRUE);
   COGL_FLAGS_SET (private_features,
                   COGL_PRIVATE_FEATURE_BUILTIN_POINT_SIZE_UNIFORM, TRUE);
   COGL_FLAGS_SET (private_features,
diff --git a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
index 5f4f72e76..27cc5c38d 100644
--- a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -309,9 +309,6 @@ _cogl_driver_update_features (CoglContext *context,
   COGL_FLAGS_SET (context->features,
                   COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE, TRUE);
 
-  COGL_FLAGS_SET (private_features,
-                  COGL_PRIVATE_FEATURE_BLEND_CONSTANT, TRUE);
-
   COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ANY_GL, TRUE);
   COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ALPHA_TEXTURES, TRUE);
 


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