[mutter] cogl: Remove always-set COGL_FEATURE_ID_POINT_SPRITE
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl: Remove always-set COGL_FEATURE_ID_POINT_SPRITE
- Date: Mon, 21 Oct 2019 21:50:55 +0000 (UTC)
commit 96da0c60bdfaa696749006b4ad4402e4c7b5443d
Author: Adam Jackson <ajax redhat com>
Date: Thu Oct 17 17:00:54 2019 -0400
cogl: Remove always-set COGL_FEATURE_ID_POINT_SPRITE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
cogl/cogl/cogl-context.c | 3 +--
cogl/cogl/cogl-context.h | 3 ---
cogl/cogl/cogl-pipeline-layer-state.c | 24 ------------------------
cogl/cogl/cogl-pipeline-layer-state.h | 4 ----
cogl/cogl/cogl-snippet.h | 3 +--
cogl/cogl/driver/gl/gl/cogl-driver-gl.c | 1 -
cogl/cogl/driver/gl/gles/cogl-driver-gles.c | 1 -
cogl/test-fixtures/test-utils.c | 6 ------
8 files changed, 2 insertions(+), 43 deletions(-)
---
diff --git a/cogl/cogl/cogl-context.c b/cogl/cogl/cogl-context.c
index e52abe320..effa4c96f 100644
--- a/cogl/cogl/cogl-context.c
+++ b/cogl/cogl/cogl-context.c
@@ -408,8 +408,7 @@ cogl_context_new (CoglDisplay *display,
pipeline to track whether any layers have point sprite coords
enabled. We don't need to do this for GL3 or GLES2 because point
sprites are handled using a builtin varying in the shader. */
- if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_GL_FIXED) &&
- cogl_has_feature (context, COGL_FEATURE_ID_POINT_SPRITE))
+ if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_GL_FIXED))
GE (context, glEnable (GL_POINT_SPRITE));
_cogl_list_init (&context->fences);
diff --git a/cogl/cogl/cogl-context.h b/cogl/cogl/cogl-context.h
index fa8165d67..f0f47240c 100644
--- a/cogl/cogl/cogl-context.h
+++ b/cogl/cogl/cogl-context.h
@@ -185,8 +185,6 @@ cogl_is_context (void *object);
* @COGL_FEATURE_ID_UNSIGNED_INT_INDICES: Set if
* %COGL_INDICES_TYPE_UNSIGNED_INT is supported in
* cogl_indices_new().
- * @COGL_FEATURE_ID_POINT_SPRITE: Whether
- * cogl_pipeline_set_layer_point_sprite_coords_enabled() is supported.
* @COGL_FEATURE_ID_MAP_BUFFER_FOR_READ: Whether cogl_buffer_map() is
* supported with CoglBufferAccess including read support.
* @COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE: Whether cogl_buffer_map() is
@@ -214,7 +212,6 @@ typedef enum _CoglFeatureID
COGL_FEATURE_ID_OFFSCREEN_MULTISAMPLE,
COGL_FEATURE_ID_ONSCREEN_MULTIPLE,
COGL_FEATURE_ID_UNSIGNED_INT_INDICES,
- COGL_FEATURE_ID_POINT_SPRITE,
COGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
COGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
diff --git a/cogl/cogl/cogl-pipeline-layer-state.c b/cogl/cogl/cogl-pipeline-layer-state.c
index 9b3feaa0f..0a1b58605 100644
--- a/cogl/cogl/cogl-pipeline-layer-state.c
+++ b/cogl/cogl/cogl-pipeline-layer-state.c
@@ -613,30 +613,6 @@ cogl_pipeline_set_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
g_return_val_if_fail (cogl_is_pipeline (pipeline), FALSE);
- /* Don't allow point sprite coordinates to be enabled if the driver
- doesn't support it */
- if (enable && !cogl_has_feature (ctx, COGL_FEATURE_ID_POINT_SPRITE))
- {
- if (error)
- {
- g_set_error_literal (error,
- COGL_SYSTEM_ERROR,
- COGL_SYSTEM_ERROR_UNSUPPORTED,
- "Point sprite texture coordinates are enabled for "
- "a layer but the GL driver does not support it.");
- }
- else
- {
- static gboolean warning_seen = FALSE;
- if (!warning_seen)
- g_warning ("Point sprite texture coordinates are enabled "
- "for a layer but the GL driver does not support it.");
- warning_seen = TRUE;
- }
-
- return FALSE;
- }
-
/* Note: this will ensure that the layer exists, creating one if it
* doesn't already.
*
diff --git a/cogl/cogl/cogl-pipeline-layer-state.h b/cogl/cogl/cogl-pipeline-layer-state.h
index 106f50f38..d055321b4 100644
--- a/cogl/cogl/cogl-pipeline-layer-state.h
+++ b/cogl/cogl/cogl-pipeline-layer-state.h
@@ -432,10 +432,6 @@ cogl_pipeline_get_layer_mag_filter (CoglPipeline *pipeline,
* have 1.0,1.0. If @enable is %FALSE then the coordinates will be
* fixed for the entire point.
*
- * This function will only work if %COGL_FEATURE_ID_POINT_SPRITE is
- * available. If the feature is not available then the function will
- * return %FALSE and set @error.
- *
* Return value: %TRUE if the function succeeds, %FALSE otherwise.
* Since: 2.0
* Stability: unstable
diff --git a/cogl/cogl/cogl-snippet.h b/cogl/cogl/cogl-snippet.h
index 19d3d6024..f9cf37f51 100644
--- a/cogl/cogl/cogl-snippet.h
+++ b/cogl/cogl/cogl-snippet.h
@@ -294,8 +294,7 @@ G_BEGIN_DECLS
* will be the bottom right. Note that there is currently a bug in
* Cogl where when rendering to an offscreen buffer these
* coordinates will be upside-down. The value is undefined when not
- * rendering points. This builtin can only be used if the
- * %COGL_FEATURE_ID_POINT_SPRITE feature is available.
+ * rendering points.
* </para></glossdef>
* </glossentry>
* </glosslist>
diff --git a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
index afc0b724a..8c8d1f5b1 100644
--- a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
+++ b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
@@ -438,7 +438,6 @@ _cogl_driver_update_features (CoglContext *ctx,
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_PBOS, TRUE);
flags |= COGL_FEATURE_POINT_SPRITE;
- COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_POINT_SPRITE, TRUE);
flags |= (COGL_FEATURE_MAP_BUFFER_FOR_READ |
COGL_FEATURE_MAP_BUFFER_FOR_WRITE);
diff --git a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
index 4e52ecb9c..5a0d7593d 100644
--- a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -311,7 +311,6 @@ _cogl_driver_update_features (CoglContext *context,
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ALPHA_TEXTURES, TRUE);
flags |= COGL_FEATURE_POINT_SPRITE;
- COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_POINT_SPRITE, TRUE);
if (context->glGenRenderbuffers)
{
diff --git a/cogl/test-fixtures/test-utils.c b/cogl/test-fixtures/test-utils.c
index e929ad6d7..f734cb62a 100644
--- a/cogl/test-fixtures/test-utils.c
+++ b/cogl/test-fixtures/test-utils.c
@@ -30,12 +30,6 @@ check_flags (TestFlags flags,
return FALSE;
}
- if (flags & TEST_REQUIREMENT_POINT_SPRITE &&
- !cogl_has_feature (test_ctx, COGL_FEATURE_ID_POINT_SPRITE))
- {
- return FALSE;
- }
-
if (flags & TEST_REQUIREMENT_MAP_WRITE &&
!cogl_has_feature (test_ctx, COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]