[Cogl] [PATCH 1/2] Remove the deprecated feature flags

Robert Bragg robert at sixbynine.org
Wed Sep 26 13:27:06 PDT 2012


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert

On Wed, Sep 26, 2012 at 5:09 PM, Neil Roberts <neil at linux.intel.com> wrote:
> The old system for checking features depended on a bitmask in an
> integer which meant we could only have up to 32 features. This was
> deprecated in 426c8b8f41. The API for using the legacy feature mask
> has already been removed so we might as well also remove the internal
> code to maintain the bitmask.
> ---
>  cogl/cogl-context-private.h                     |  1 -
>  cogl/cogl-context.c                             | 15 +----
>  cogl/cogl-feature-private.c                     |  2 +-
>  cogl/cogl-feature-private.h                     |  2 -
>  cogl/cogl-glx-renderer-private.h                |  2 +-
>  cogl/cogl-types.h                               | 75 -------------------------
>  cogl/driver/gl/gl/cogl-driver-gl.c              | 57 ++++---------------
>  cogl/driver/gl/gles/cogl-driver-gles.c          | 45 +++------------
>  cogl/driver/nop/cogl-driver-nop.c               |  1 -
>  cogl/winsys/cogl-winsys-egl-wayland.c           |  1 -
>  cogl/winsys/cogl-winsys-egl-x11.c               |  1 -
>  cogl/winsys/cogl-winsys-egl.c                   |  2 +-
>  cogl/winsys/cogl-winsys-glx-feature-functions.h |  6 --
>  cogl/winsys/cogl-winsys-glx.c                   |  8 +--
>  doc/reference/cogl2/cogl2-sections.txt          |  2 -
>  15 files changed, 28 insertions(+), 192 deletions(-)
>
> diff --git a/cogl/cogl-context-private.h b/cogl/cogl-context-private.h
> index 8e35099..b457bb0 100644
> --- a/cogl/cogl-context-private.h
> +++ b/cogl/cogl-context-private.h
> @@ -76,7 +76,6 @@ struct _CoglContext
>
>    /* Features cache */
>    unsigned long features[COGL_FLAGS_N_LONGS_FOR_SIZE (_COGL_N_FEATURE_IDS)];
> -  CoglFeatureFlags feature_flags; /* legacy/deprecated feature flags */
>    CoglPrivateFeatureFlags private_feature_flags;
>
>    CoglPipeline *default_pipeline;
> diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
> index e7a68a7..1d02f1f 100644
> --- a/cogl/cogl-context.c
> +++ b/cogl/cogl-context.c
> @@ -81,23 +81,13 @@ _cogl_init_feature_overrides (CoglContext *ctx)
>      ctx->private_feature_flags &= ~COGL_PRIVATE_FEATURE_PBOS;
>
>    if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_ARBFP)))
> -    {
> -      ctx->feature_flags &= ~COGL_FEATURE_SHADERS_ARBFP;
> -      COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_ARBFP, FALSE);
> -    }
> +    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_ARBFP, FALSE);
>
>    if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_GLSL)))
> -    {
> -      ctx->feature_flags &= ~COGL_FEATURE_SHADERS_GLSL;
> -      COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_GLSL, FALSE);
> -    }
> +    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_GLSL, FALSE);
>
>    if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_NPOT_TEXTURES)))
>      {
> -      ctx->feature_flags &= ~(COGL_FEATURE_TEXTURE_NPOT |
> -                              COGL_FEATURE_TEXTURE_NPOT_BASIC |
> -                              COGL_FEATURE_TEXTURE_NPOT_MIPMAP |
> -                              COGL_FEATURE_TEXTURE_NPOT_REPEAT);
>        COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_TEXTURE_NPOT, FALSE);
>        COGL_FLAGS_SET (ctx->features,
>                        COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, FALSE);
> @@ -171,7 +161,6 @@ cogl_context_new (CoglDisplay *display,
>
>    /* Init default values */
>    memset (context->features, 0, sizeof (context->features));
> -  context->feature_flags = 0;
>    context->private_feature_flags = 0;
>
>    context->texture_types = NULL;
> diff --git a/cogl/cogl-feature-private.c b/cogl/cogl-feature-private.c
> index 7883b3c..10562cf 100644
> --- a/cogl/cogl-feature-private.c
> +++ b/cogl/cogl-feature-private.c
> @@ -175,7 +175,7 @@ error:
>                         gles_availability,                               \
>                         namespaces, extension_names)                     \
>    { min_gl_major, min_gl_minor, gles_availability, namespaces,          \
> -      extension_names, 0, 0, 0,                                         \
> +      extension_names, 0, 0,                                            \
>      cogl_ext_ ## name ## _funcs },
>  #undef COGL_EXT_FUNCTION
>  #define COGL_EXT_FUNCTION(ret, name, args)
> diff --git a/cogl/cogl-feature-private.h b/cogl/cogl-feature-private.h
> index ad210a5..fd284e2 100644
> --- a/cogl/cogl-feature-private.h
> +++ b/cogl/cogl-feature-private.h
> @@ -68,8 +68,6 @@ struct _CoglFeatureData
>       extension is different from the namespace, you can specify it
>       with a ':' after the namespace */
>    const char *extension_names;
> -  /* A set of feature flags to enable if the extension is available */
> -  CoglFeatureFlags feature_flags;
>    /* A set of private feature flags to enable if the extension is
>     * available */
>    int feature_flags_private;
> diff --git a/cogl/cogl-glx-renderer-private.h b/cogl/cogl-glx-renderer-private.h
> index 4415ea5..41cdc6f 100644
> --- a/cogl/cogl-glx-renderer-private.h
> +++ b/cogl/cogl-glx-renderer-private.h
> @@ -96,7 +96,7 @@ typedef struct _CoglGLXRenderer
>    (* glXGetProcAddress) (const GLubyte *procName);
>
>    /* Function pointers for GLX specific extensions */
> -#define COGL_WINSYS_FEATURE_BEGIN(a, b, c, d, e, f)
> +#define COGL_WINSYS_FEATURE_BEGIN(a, b, c, d, e)
>
>  #define COGL_WINSYS_FEATURE_FUNCTION(ret, name, args) \
>    ret (APIENTRY * pf_ ## name) args;
> diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h
> index 07511d0..cec8a1a 100644
> --- a/cogl/cogl-types.h
> +++ b/cogl/cogl-types.h
> @@ -341,81 +341,6 @@ typedef enum { /*< prefix=COGL_PIXEL_FORMAT >*/
>  } CoglPixelFormat;
>
>  /**
> - * CoglFeatureFlags:
> - * @COGL_FEATURE_TEXTURE_RECTANGLE: ARB_texture_rectangle support
> - * @COGL_FEATURE_TEXTURE_NPOT: Non power of two textures are supported
> - *    by the hardware. This is a equivalent to the
> - *    %COGL_FEATURE_TEXTURE_NPOT_BASIC, %COGL_FEATURE_TEXTURE_NPOT_MIPMAP
> - *    and %COGL_FEATURE_TEXTURE_NPOT_REPEAT features combined.
> - * @COGL_FEATURE_TEXTURE_YUV: ycbcr conversion support
> - * @COGL_FEATURE_TEXTURE_READ_PIXELS: glReadPixels() support
> - * @COGL_FEATURE_SHADERS_GLSL: GLSL support
> - * @COGL_FEATURE_SHADERS_ARBFP: ARBFP support
> - * @COGL_FEATURE_OFFSCREEN: FBO support
> - * @COGL_FEATURE_OFFSCREEN_MULTISAMPLE: Multisample support on FBOs
> - * @COGL_FEATURE_OFFSCREEN_BLIT: Blit support on FBOs
> - * @COGL_FEATURE_FOUR_CLIP_PLANES: At least 4 clip planes available
> - * @COGL_FEATURE_STENCIL_BUFFER: Stencil buffer support
> - * @COGL_FEATURE_VBOS: VBO support
> - * @COGL_FEATURE_PBOS: PBO support
> - * @COGL_FEATURE_UNSIGNED_INT_INDICES: Set if
> - *     %COGL_INDICES_TYPE_UNSIGNED_INT is supported in
> - *     cogl_indices_new().
> - * @COGL_FEATURE_DEPTH_RANGE: cogl_material_set_depth_range() support
> - * @COGL_FEATURE_TEXTURE_NPOT_BASIC: The hardware supports non power
> - *     of two textures, but you also need to check the
> - *     %COGL_FEATURE_TEXTURE_NPOT_MIPMAP and %COGL_FEATURE_TEXTURE_NPOT_REPEAT
> - *     features to know if the hardware supports npot texture mipmaps
> - *     or repeat modes other than
> - *     %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE respectively.
> - * @COGL_FEATURE_TEXTURE_NPOT_MIPMAP: Mipmapping is supported in
> - *     conjuntion with non power of two textures.
> - * @COGL_FEATURE_TEXTURE_NPOT_REPEAT: Repeat modes other than
> - *     %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE are supported by the
> - *     hardware.
> - * @COGL_FEATURE_POINT_SPRITE: Whether
> - *     cogl_material_set_layer_point_sprite_coords_enabled() is supported.
> - * @COGL_FEATURE_TEXTURE_3D: 3D texture support
> - * @COGL_FEATURE_MAP_BUFFER_FOR_READ: Whether cogl_buffer_map() is
> - *     supported with CoglBufferAccess including read support.
> - * @COGL_FEATURE_MAP_BUFFER_FOR_WRITE: Whether cogl_buffer_map() is
> - *     supported with CoglBufferAccess including write support.
> - * @COGL_FEATURE_DEPTH_TEXTURE: Whether #CoglFramebuffer support rendering the
> - *     depth buffer to a texture.
> - *
> - * Flags for the supported features.
> - *
> - * Since: 0.8
> - */
> -typedef enum
> -{
> -  COGL_FEATURE_TEXTURE_RECTANGLE      = (1 << 1),
> -  COGL_FEATURE_TEXTURE_NPOT           = (1 << 2),
> -  COGL_FEATURE_TEXTURE_YUV            = (1 << 3),
> -  COGL_FEATURE_TEXTURE_READ_PIXELS    = (1 << 4),
> -  COGL_FEATURE_SHADERS_GLSL           = (1 << 5),
> -  COGL_FEATURE_OFFSCREEN              = (1 << 6),
> -  COGL_FEATURE_OFFSCREEN_MULTISAMPLE  = (1 << 7),
> -  COGL_FEATURE_OFFSCREEN_BLIT         = (1 << 8),
> -  COGL_FEATURE_FOUR_CLIP_PLANES       = (1 << 9),
> -  COGL_FEATURE_STENCIL_BUFFER         = (1 << 10),
> -  COGL_FEATURE_VBOS                  = (1 << 11),
> -  COGL_FEATURE_PBOS                  = (1 << 12),
> -  COGL_FEATURE_UNSIGNED_INT_INDICES   = (1 << 13),
> -  COGL_FEATURE_DEPTH_RANGE            = (1 << 14),
> -  COGL_FEATURE_TEXTURE_NPOT_BASIC     = (1 << 15),
> -  COGL_FEATURE_TEXTURE_NPOT_MIPMAP    = (1 << 16),
> -  COGL_FEATURE_TEXTURE_NPOT_REPEAT    = (1 << 17),
> -  COGL_FEATURE_POINT_SPRITE           = (1 << 18),
> -  COGL_FEATURE_TEXTURE_3D             = (1 << 19),
> -  COGL_FEATURE_SHADERS_ARBFP          = (1 << 20),
> -  COGL_FEATURE_MAP_BUFFER_FOR_READ    = (1 << 21),
> -  COGL_FEATURE_MAP_BUFFER_FOR_WRITE   = (1 << 22),
> -  COGL_FEATURE_ONSCREEN_MULTIPLE      = (1 << 23),
> -  COGL_FEATURE_DEPTH_TEXTURE          = (1 << 24)
> -} CoglFeatureFlags;
> -
> -/**
>   * CoglBufferTarget:
>   * @COGL_WINDOW_BUFFER: FIXME
>   * @COGL_OFFSCREEN_BUFFER: FIXME
> diff --git a/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/driver/gl/gl/cogl-driver-gl.c
> index add1f2c..b5ac623 100644
> --- a/cogl/driver/gl/gl/cogl-driver-gl.c
> +++ b/cogl/driver/gl/gl/cogl-driver-gl.c
> @@ -332,7 +332,6 @@ _cogl_driver_update_features (CoglContext *ctx,
>                                CoglError **error)
>  {
>    CoglPrivateFeatureFlags private_flags = 0;
> -  CoglFeatureFlags flags = 0;
>    const char *gl_extensions;
>    int max_clip_planes = 0;
>    int num_stencil_bits = 0;
> @@ -364,9 +363,6 @@ _cogl_driver_update_features (CoglContext *ctx,
>
>    _cogl_gpu_info_init (ctx, &ctx->gpu);
>
> -  flags = (COGL_FEATURE_TEXTURE_READ_PIXELS
> -           | COGL_FEATURE_UNSIGNED_INT_INDICES
> -           | COGL_FEATURE_DEPTH_RANGE);
>    COGL_FLAGS_SET (ctx->features,
>                    COGL_FEATURE_ID_UNSIGNED_INT_INDICES, TRUE);
>    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_DEPTH_RANGE, TRUE);
> @@ -384,10 +380,6 @@ _cogl_driver_update_features (CoglContext *ctx,
>    if (COGL_CHECK_GL_VERSION (gl_major, gl_minor, 2, 0) ||
>        _cogl_check_extension ("GL_ARB_texture_non_power_of_two", gl_extensions))
>      {
> -      flags |= COGL_FEATURE_TEXTURE_NPOT
> -        | COGL_FEATURE_TEXTURE_NPOT_BASIC
> -        | COGL_FEATURE_TEXTURE_NPOT_MIPMAP
> -        | COGL_FEATURE_TEXTURE_NPOT_REPEAT;
>        COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_TEXTURE_NPOT, TRUE);
>        COGL_FLAGS_SET (ctx->features,
>                        COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
> @@ -410,27 +402,18 @@ _cogl_driver_update_features (CoglContext *ctx,
>      private_flags |= COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES;
>
>    if (ctx->glGenRenderbuffers)
> -    {
> -      flags |= COGL_FEATURE_OFFSCREEN;
> -      COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_OFFSCREEN, TRUE);
> -    }
> +    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_OFFSCREEN, TRUE);
>
>    if (ctx->glBlitFramebuffer)
>      private_flags |= COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT;
>
>    if (ctx->glRenderbufferStorageMultisampleIMG)
> -    {
> -      flags |= COGL_FEATURE_OFFSCREEN_MULTISAMPLE;
> -      COGL_FLAGS_SET (ctx->features,
> -                      COGL_FEATURE_ID_OFFSCREEN_MULTISAMPLE, TRUE);
> -    }
> +    COGL_FLAGS_SET (ctx->features,
> +                    COGL_FEATURE_ID_OFFSCREEN_MULTISAMPLE, TRUE);
>
>    if (COGL_CHECK_GL_VERSION (gl_major, gl_minor, 3, 0) ||
>        _cogl_check_extension ("GL_ARB_depth_texture", gl_extensions))
> -    {
> -      flags |= COGL_FEATURE_DEPTH_TEXTURE;
> -      COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_DEPTH_TEXTURE, TRUE);
> -    }
> +    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_DEPTH_TEXTURE, TRUE);
>
>    if (COGL_CHECK_GL_VERSION (gl_major, gl_minor, 2, 1) ||
>        _cogl_check_extension ("GL_EXT_pixel_buffer_object", gl_extensions))
> @@ -438,22 +421,14 @@ _cogl_driver_update_features (CoglContext *ctx,
>
>    if (COGL_CHECK_GL_VERSION (gl_major, gl_minor, 2, 0) ||
>        _cogl_check_extension ("GL_ARB_point_sprite", gl_extensions))
> -    {
> -      flags |= COGL_FEATURE_POINT_SPRITE;
> -      COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_POINT_SPRITE, TRUE);
> -    }
> +    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_POINT_SPRITE, TRUE);
>
>    if (ctx->glGenPrograms)
> -    {
> -      flags |= COGL_FEATURE_SHADERS_ARBFP;
> -      COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_ARBFP, TRUE);
> -    }
> +    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_ARBFP, TRUE);
>
>    if (ctx->glCreateProgram)
> -    {
> -      flags |= COGL_FEATURE_SHADERS_GLSL;
> -      COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_GLSL, TRUE);
> -    }
> +    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_GLSL, TRUE);
> +
>    /* If all of the old GLSL extensions are available then we can fake
>     * the GL 2.0 GLSL support by diverting to the old function names */
>    else if (ctx->glCreateProgramObject && /* GL_ARB_shader_objects */
> @@ -478,15 +453,12 @@ _cogl_driver_update_features (CoglContext *ctx,
>         * GLES2 context on top of regular GL then we'll need to do
>         * something here */
>
> -      flags |= COGL_FEATURE_SHADERS_GLSL;
>        COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_GLSL, TRUE);
>      }
>
>    if (ctx->glGenBuffers)
>      {
>        private_flags |= COGL_PRIVATE_FEATURE_VBOS;
> -      flags |= (COGL_FEATURE_MAP_BUFFER_FOR_READ |
> -                COGL_FEATURE_MAP_BUFFER_FOR_WRITE);
>        COGL_FLAGS_SET (ctx->features,
>                           COGL_FEATURE_ID_MAP_BUFFER_FOR_READ, TRUE);
>        COGL_FLAGS_SET (ctx->features,
> @@ -494,17 +466,11 @@ _cogl_driver_update_features (CoglContext *ctx,
>      }
>
>    if (_cogl_check_extension ("GL_ARB_texture_rectangle", gl_extensions))
> -    {
> -      flags |= COGL_FEATURE_TEXTURE_RECTANGLE;
> -      COGL_FLAGS_SET (ctx->features,
> -                      COGL_FEATURE_ID_TEXTURE_RECTANGLE, TRUE);
> -    }
> +    COGL_FLAGS_SET (ctx->features,
> +                    COGL_FEATURE_ID_TEXTURE_RECTANGLE, TRUE);
>
>    if (ctx->glTexImage3D)
> -    {
> -      flags |= COGL_FEATURE_TEXTURE_3D;
> -      COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_TEXTURE_3D, TRUE);
> -    }
> +    COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_TEXTURE_3D, TRUE);
>
>    if (ctx->glEGLImageTargetTexture2D)
>      private_flags |= COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE;
> @@ -517,7 +483,6 @@ _cogl_driver_update_features (CoglContext *ctx,
>
>    /* Cache features */
>    ctx->private_feature_flags |= private_flags;
> -  ctx->feature_flags |= flags;
>
>    return TRUE;
>  }
> diff --git a/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c
> index 05262c9..7f4b752 100644
> --- a/cogl/driver/gl/gles/cogl-driver-gles.c
> +++ b/cogl/driver/gl/gles/cogl-driver-gles.c
> @@ -190,7 +190,6 @@ _cogl_driver_update_features (CoglContext *context,
>                                CoglError **error)
>  {
>    CoglPrivateFeatureFlags private_flags = 0;
> -  CoglFeatureFlags flags = 0;
>    const char *gl_extensions;
>    int num_stencil_bits = 0;
>
> @@ -239,11 +238,8 @@ _cogl_driver_update_features (CoglContext *context,
>
>    if (context->driver == COGL_DRIVER_GLES2)
>      {
> -      flags |= COGL_FEATURE_SHADERS_GLSL | COGL_FEATURE_OFFSCREEN;
>        /* Note GLES 2 core doesn't support mipmaps for npot textures or
>         * repeat modes other than CLAMP_TO_EDGE. */
> -      flags |= COGL_FEATURE_TEXTURE_NPOT_BASIC;
> -      flags |= COGL_FEATURE_DEPTH_RANGE;
>        COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_GLSL, TRUE);
>        COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_OFFSCREEN, TRUE);
>        COGL_FLAGS_SET (context->features,
> @@ -256,37 +252,23 @@ _cogl_driver_update_features (CoglContext *context,
>    private_flags |= COGL_PRIVATE_FEATURE_VBOS;
>
>    /* Both GLES 1.1 and GLES 2.0 support point sprites in core */
> -  flags |= COGL_FEATURE_POINT_SPRITE;
>    COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_POINT_SPRITE, TRUE);
>
>    if (context->glGenRenderbuffers)
> -    {
> -      flags |= COGL_FEATURE_OFFSCREEN;
> -      COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_OFFSCREEN, TRUE);
> -    }
> +    COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_OFFSCREEN, TRUE);
>
>    if (context->glBlitFramebuffer)
>      private_flags |= COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT;
>
>    if (_cogl_check_extension ("GL_OES_element_index_uint", gl_extensions))
> -    {
> -      flags |= COGL_FEATURE_UNSIGNED_INT_INDICES;
> -      COGL_FLAGS_SET (context->features,
> -                      COGL_FEATURE_ID_UNSIGNED_INT_INDICES, TRUE);
> -    }
> +    COGL_FLAGS_SET (context->features,
> +                    COGL_FEATURE_ID_UNSIGNED_INT_INDICES, TRUE);
>
>    if (_cogl_check_extension ("GL_OES_depth_texture", gl_extensions))
> -    {
> -      flags |= COGL_FEATURE_DEPTH_TEXTURE;
> -      COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_DEPTH_TEXTURE, TRUE);
> -    }
> +    COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_DEPTH_TEXTURE, TRUE);
>
>    if (_cogl_check_extension ("GL_OES_texture_npot", gl_extensions))
>      {
> -      flags |= (COGL_FEATURE_TEXTURE_NPOT |
> -                COGL_FEATURE_TEXTURE_NPOT_BASIC |
> -                COGL_FEATURE_TEXTURE_NPOT_MIPMAP |
> -                COGL_FEATURE_TEXTURE_NPOT_REPEAT);
>        COGL_FLAGS_SET (context->features,
>                        COGL_FEATURE_ID_TEXTURE_NPOT, TRUE);
>        COGL_FLAGS_SET (context->features,
> @@ -298,8 +280,6 @@ _cogl_driver_update_features (CoglContext *context,
>      }
>    else if (_cogl_check_extension ("GL_IMG_texture_npot", gl_extensions))
>      {
> -      flags |= (COGL_FEATURE_TEXTURE_NPOT_BASIC |
> -                COGL_FEATURE_TEXTURE_NPOT_MIPMAP);
>        COGL_FLAGS_SET (context->features,
>                        COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
>        COGL_FLAGS_SET (context->features,
> @@ -307,19 +287,13 @@ _cogl_driver_update_features (CoglContext *context,
>      }
>
>    if (context->glTexImage3D)
> -    {
> -      flags |= COGL_FEATURE_TEXTURE_3D;
> -      COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_TEXTURE_3D, TRUE);
> -    }
> +    COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_TEXTURE_3D, TRUE);
>
>    if (context->glMapBuffer)
> -    {
> -      /* The GL_OES_mapbuffer extension doesn't support mapping for
> -         read */
> -      flags |= COGL_FEATURE_MAP_BUFFER_FOR_WRITE;
> -      COGL_FLAGS_SET (context->features,
> -                      COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE, TRUE);
> -    }
> +    /* The GL_OES_mapbuffer extension doesn't support mapping for
> +       read */
> +    COGL_FLAGS_SET (context->features,
> +                    COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE, TRUE);
>
>    if (context->glEGLImageTargetTexture2D)
>      private_flags |= COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE;
> @@ -335,7 +309,6 @@ _cogl_driver_update_features (CoglContext *context,
>
>    /* Cache features */
>    context->private_feature_flags |= private_flags;
> -  context->feature_flags |= flags;
>
>    return TRUE;
>  }
> diff --git a/cogl/driver/nop/cogl-driver-nop.c b/cogl/driver/nop/cogl-driver-nop.c
> index 9753cff..c0e9699 100644
> --- a/cogl/driver/nop/cogl-driver-nop.c
> +++ b/cogl/driver/nop/cogl-driver-nop.c
> @@ -45,7 +45,6 @@ _cogl_driver_update_features (CoglContext *ctx,
>    /* _cogl_gpu_info_init (ctx, &ctx->gpu); */
>
>    ctx->private_feature_flags = 0;
> -  ctx->feature_flags = 0;
>
>    return TRUE;
>  }
> diff --git a/cogl/winsys/cogl-winsys-egl-wayland.c b/cogl/winsys/cogl-winsys-egl-wayland.c
> index 694ecc1..9c4480a 100644
> --- a/cogl/winsys/cogl-winsys-egl-wayland.c
> +++ b/cogl/winsys/cogl-winsys-egl-wayland.c
> @@ -285,7 +285,6 @@ static CoglBool
>  _cogl_winsys_egl_context_init (CoglContext *context,
>                                 CoglError **error)
>  {
> -  context->feature_flags |= COGL_FEATURE_ONSCREEN_MULTIPLE;
>    COGL_FLAGS_SET (context->features,
>                    COGL_FEATURE_ID_ONSCREEN_MULTIPLE, TRUE);
>    COGL_FLAGS_SET (context->winsys_features,
> diff --git a/cogl/winsys/cogl-winsys-egl-x11.c b/cogl/winsys/cogl-winsys-egl-x11.c
> index fca7609..43ac07e 100644
> --- a/cogl/winsys/cogl-winsys-egl-x11.c
> +++ b/cogl/winsys/cogl-winsys-egl-x11.c
> @@ -251,7 +251,6 @@ _cogl_winsys_egl_context_init (CoglContext *context,
>                                   event_filter_cb,
>                                   context);
>
> -  context->feature_flags |= COGL_FEATURE_ONSCREEN_MULTIPLE;
>    COGL_FLAGS_SET (context->features,
>                    COGL_FEATURE_ID_ONSCREEN_MULTIPLE, TRUE);
>    COGL_FLAGS_SET (context->winsys_features,
> diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
> index dcd17ed..11da250 100644
> --- a/cogl/winsys/cogl-winsys-egl.c
> +++ b/cogl/winsys/cogl-winsys-egl.c
> @@ -71,7 +71,7 @@
>  #define COGL_WINSYS_FEATURE_BEGIN(name, namespaces, extension_names,    \
>                                    egl_private_flags)                    \
>    { 255, 255, 0, namespaces, extension_names,                           \
> -      0, egl_private_flags,                                             \
> +      egl_private_flags,                                                \
>        0,                                                                \
>        cogl_egl_feature_ ## name ## _funcs },
>  #undef COGL_WINSYS_FEATURE_FUNCTION
> diff --git a/cogl/winsys/cogl-winsys-glx-feature-functions.h b/cogl/winsys/cogl-winsys-glx-feature-functions.h
> index 71fd827..c20f925 100644
> --- a/cogl/winsys/cogl-winsys-glx-feature-functions.h
> +++ b/cogl/winsys/cogl-winsys-glx-feature-functions.h
> @@ -28,7 +28,6 @@
>
>  /* Macro prototypes:
>   * COGL_WINSYS_FEATURE_BEGIN (name, namespaces, extension_names,
> - *                            implied_public_feature_flags,
>   *                            implied_private_feature_flags,
>   *                            implied_winsys_feature)
>   * COGL_WINSYS_FEATURE_FUNCTION (return_type, function_name,
> @@ -47,7 +46,6 @@ COGL_WINSYS_FEATURE_BEGIN (texture_from_pixmap,
>                             "EXT\0",
>                             "texture_from_pixmap\0",
>                             0,
> -                           0,
>                             COGL_WINSYS_FEATURE_TEXTURE_FROM_PIXMAP)
>  COGL_WINSYS_FEATURE_FUNCTION (void, glXBindTexImage,
>                                (Display *display,
> @@ -64,7 +62,6 @@ COGL_WINSYS_FEATURE_BEGIN (video_sync,
>                             "SGI\0",
>                             "video_sync\0",
>                             0,
> -                           0,
>                             COGL_WINSYS_FEATURE_VBLANK_COUNTER)
>  COGL_WINSYS_FEATURE_FUNCTION (int, glXGetVideoSync,
>                                (unsigned int *count))
> @@ -78,7 +75,6 @@ COGL_WINSYS_FEATURE_BEGIN (swap_control,
>                             "SGI\0",
>                             "swap_control\0",
>                             0,
> -                           0,
>                             COGL_WINSYS_FEATURE_SWAP_THROTTLE)
>  COGL_WINSYS_FEATURE_FUNCTION (int, glXSwapInterval,
>                                (int interval))
> @@ -88,7 +84,6 @@ COGL_WINSYS_FEATURE_BEGIN (copy_sub_buffer,
>                             "MESA\0",
>                             "copy_sub_buffer\0",
>                             0,
> -                           0,
>  /* We initially assumed that copy_sub_buffer is synchronized on
>   * which is only the case for a subset of GPUs for example it is not
>   * synchronized on INTEL gen6 and gen7, so we remove this assumption
> @@ -108,6 +103,5 @@ COGL_WINSYS_FEATURE_BEGIN (swap_event,
>                             "INTEL\0",
>                             "swap_event\0",
>                             0,
> -                           0,
>                             COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT)
>  COGL_WINSYS_FEATURE_END ()
> diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
> index 5b016ec..3bf4bbe 100644
> --- a/cogl/winsys/cogl-winsys-glx.c
> +++ b/cogl/winsys/cogl-winsys-glx.c
> @@ -99,7 +99,7 @@ typedef struct _CoglTexturePixmapGLX
>  /* Define a set of arrays containing the functions required from GL
>     for each winsys feature */
>  #define COGL_WINSYS_FEATURE_BEGIN(name, namespaces, extension_names,    \
> -                                  feature_flags, feature_flags_private, \
> +                                  feature_flags_private,                \
>                                    winsys_feature)                       \
>    static const CoglFeatureFunction                                      \
>    cogl_glx_feature_ ## name ## _funcs[] = {
> @@ -113,10 +113,10 @@ typedef struct _CoglTexturePixmapGLX
>  /* Define an array of features */
>  #undef COGL_WINSYS_FEATURE_BEGIN
>  #define COGL_WINSYS_FEATURE_BEGIN(name, namespaces, extension_names,    \
> -                                  feature_flags, feature_flags_private, \
> +                                  feature_flags_private,                \
>                                    winsys_feature)                       \
>    { 255, 255, 0, namespaces, extension_names,                           \
> -      feature_flags, feature_flags_private,                             \
> +      feature_flags_private,                                            \
>        winsys_feature, \
>        cogl_glx_feature_ ## name ## _funcs },
>  #undef COGL_WINSYS_FEATURE_FUNCTION
> @@ -411,7 +411,6 @@ update_winsys_features (CoglContext *context, CoglError **error)
>
>    COGL_NOTE (WINSYS, "  GLX Extensions: %s", glx_extensions);
>
> -  context->feature_flags |= COGL_FEATURE_ONSCREEN_MULTIPLE;
>    COGL_FLAGS_SET (context->features,
>                    COGL_FEATURE_ID_ONSCREEN_MULTIPLE, TRUE);
>    COGL_FLAGS_SET (context->winsys_features,
> @@ -425,7 +424,6 @@ update_winsys_features (CoglContext *context, CoglError **error)
>                               glx_extensions,
>                               glx_renderer))
>        {
> -        context->feature_flags |= winsys_feature_data[i].feature_flags;
>          if (winsys_feature_data[i].winsys_feature)
>            COGL_FLAGS_SET (context->winsys_features,
>                            winsys_feature_data[i].winsys_feature,
> diff --git a/doc/reference/cogl2/cogl2-sections.txt b/doc/reference/cogl2/cogl2-sections.txt
> index 91ded8c..e5cb2fd 100644
> --- a/doc/reference/cogl2/cogl2-sections.txt
> +++ b/doc/reference/cogl2/cogl2-sections.txt
> @@ -112,7 +112,6 @@ COGL_TYPE_BUFFER_UPDATE_HINT
>  COGL_TYPE_BUFFER_USAGE_HINT
>  COGL_TYPE_DEBUG_FLAGS
>  COGL_TYPE_DRIVER_ERROR
> -COGL_TYPE_FEATURE_FLAGS
>  COGL_TYPE_INDICES_TYPE
>  COGL_TYPE_PIXEL_FORMAT
>  COGL_TYPE_READ_PIXELS_FLAGS
> @@ -127,7 +126,6 @@ cogl_buffer_bit_get_type
>  cogl_buffer_target_get_type
>  cogl_debug_flags_get_type
>  cogl_driver_error_get_type
> -cogl_feature_flags_get_type
>  cogl_indices_type_get_type
>  cogl_pixel_format_get_type
>  cogl_read_pixels_flags_get_type
> --
> 1.7.11.3.g3c3efa5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list