cogl: Remove always-set COGL_FEATURE_ID_POINT_SPRITE

https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
This commit is contained in:
Adam Jackson 2019-10-17 17:00:54 -04:00 committed by Georges Basile Stavracas Neto
parent da36575d7f
commit 96da0c60bd
8 changed files with 2 additions and 43 deletions

View File

@ -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);

View File

@ -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,

View File

@ -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.
*

View File

@ -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

View File

@ -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>

View File

@ -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);

View File

@ -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)
{

View File

@ -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))
{