cogl: Remove COGL_PRIVATE_FEATURE_GL_EMBEDDED

Only the driver backend cares about this now, we can equivalently check
that the driver is COGL_DRIVER_GLES2.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
This commit is contained in:
Adam Jackson 2019-10-23 12:02:30 -04:00 committed by Georges Basile Stavracas Neto
parent fdf830940b
commit 68d0c11d88
3 changed files with 3 additions and 6 deletions

View File

@ -69,7 +69,6 @@ typedef enum
* sets that can be shared by several GL apis */
COGL_PRIVATE_FEATURE_ANY_GL,
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
COGL_PRIVATE_FEATURE_GL_EMBEDDED,
COGL_N_PRIVATE_FEATURES
} CoglPrivateFeature;

View File

@ -113,7 +113,6 @@ static CoglDriverDescription _cogl_drivers[] =
COGL_DRIVER_GLES2,
"gles2",
{ COGL_PRIVATE_FEATURE_ANY_GL,
COGL_PRIVATE_FEATURE_GL_EMBEDDED,
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
-1 },
&_cogl_driver_gles,

View File

@ -307,7 +307,7 @@ flush_depth_state (CoglContext *ctx,
if ((ctx->depth_range_near_cache != depth_state->range_near ||
ctx->depth_range_far_cache != depth_state->range_far))
{
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
if (ctx->driver == COGL_DRIVER_GLES2)
GE (ctx, glDepthRangef (depth_state->range_near,
depth_state->range_far));
else
@ -535,7 +535,7 @@ get_max_activateable_texture_units (void)
int i;
#ifdef HAVE_COGL_GL
if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
if (ctx->driver != COGL_DRIVER_GLES2)
{
/* GL_MAX_TEXTURE_COORDS defines the number of texture coordinates
* that can be uploaded (but doesn't necessarily relate to how many
@ -548,8 +548,7 @@ get_max_activateable_texture_units (void)
#endif /* HAVE_COGL_GL */
#ifdef HAVE_COGL_GLES2
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED) &&
_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE))
if (ctx->driver == COGL_DRIVER_GLES2)
{
GE (ctx, glGetIntegerv (GL_MAX_VERTEX_ATTRIBS, values + n_values));
/* Two of the vertex attribs need to be used for the position