mesa: Remove EXT_bgra and EXT_texture_format_BGRA8888 extension enable flags
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 31 Aug 2011 18:43:39 +0000 (11:43 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 26 Sep 2011 19:14:14 +0000 (12:14 -0700)
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

EXT_texture_format_BGRA8888 is mostly a subset of EXT_bgra.  The only
difference seems to be that EXT_texture_format_BGRA8888 allows GL_BGRA
as an internal format to glTexImage2D and friends.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/intel/intel_extensions_es.c
src/mesa/main/extensions.c
src/mesa/main/mtypes.h
src/mesa/main/texformat.c
src/mesa/main/teximage.c
src/mesa/state_tracker/st_extensions.c

index 6fcd047224bde9f690d2f4e224c5c5c0466a4a1e..bbc32203626979bf8d316428c4666bca09baad57 100644 (file)
@@ -48,7 +48,6 @@ static const char *common_extensions[] = {
 #endif
    "GL_EXT_texture_filter_anisotropic",
    "GL_EXT_packed_depth_stencil",
-   "GL_EXT_texture_format_BGRA8888",
    "GL_EXT_blend_minmax",
 
    NULL
index 948027577a382243004b5f3030f11ffbd77b71b4..93dbff7c3a32783df1fe075ed5ac66558c9f3cb3 100644 (file)
@@ -147,7 +147,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_window_pos",                          o(ARB_window_pos),                          GL,             2001 },
    /* EXT extensions */
    { "GL_EXT_abgr",                                o(EXT_abgr),                                GL,             1995 },
-   { "GL_EXT_bgra",                                o(EXT_bgra),                                GL,             1995 },
+   { "GL_EXT_bgra",                                o(dummy_true),                              GL,             1995 },
    { "GL_EXT_blend_color",                         o(EXT_blend_color),                         GL,             1995 },
    { "GL_EXT_blend_equation_separate",             o(EXT_blend_equation_separate),             GL,             2003 },
    { "GL_EXT_blend_func_separate",                 o(EXT_blend_func_separate),                 GL,             1999 },
@@ -195,7 +195,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_texture_env_combine",                 o(EXT_texture_env_combine),                 GL,             2000 },
    { "GL_EXT_texture_env_dot3",                    o(EXT_texture_env_dot3),                    GL,             2000 },
    { "GL_EXT_texture_filter_anisotropic",          o(EXT_texture_filter_anisotropic),          GL | ES1 | ES2, 1999 },
-   { "GL_EXT_texture_format_BGRA8888",             o(EXT_texture_format_BGRA8888),                  ES1 | ES2, 2009 },
+   { "GL_EXT_texture_format_BGRA8888",             o(dummy_true),                                   ES1 | ES2, 2005 },
    { "GL_EXT_texture_integer",                     o(EXT_texture_integer),                     GL,             2006 },
    { "GL_EXT_texture_lod_bias",                    o(EXT_texture_lod_bias),                    GL | ES1,       1999 },
    { "GL_EXT_texture_mirror_clamp",                o(EXT_texture_mirror_clamp),                GL,             2004 },
@@ -346,7 +346,6 @@ static const size_t default_extensions[] = {
    o(ARB_window_pos),
 
    o(EXT_abgr),
-   o(EXT_bgra),
    o(EXT_compiled_vertex_array),
    o(EXT_draw_range_elements),
    o(EXT_packed_pixels),
index 866ec0a619a594381bf2ad679f09a4870b813944..360acea897db86312ff8c9f502c84a3d10d62f1c 100644 (file)
@@ -2802,7 +2802,6 @@ struct gl_extensions
    GLboolean ARB_vertex_type_2_10_10_10_rev;
    GLboolean ARB_window_pos;
    GLboolean EXT_abgr;
-   GLboolean EXT_bgra;
    GLboolean EXT_blend_color;
    GLboolean EXT_blend_equation_separate;
    GLboolean EXT_blend_func_separate;
@@ -2889,7 +2888,6 @@ struct gl_extensions
    GLboolean S3_s3tc;
    GLboolean OES_EGL_image;
    GLboolean OES_draw_texture;
-   GLboolean EXT_texture_format_BGRA8888;
    GLboolean extension_sentinel;
    /** The extension string */
    const GLubyte *String;
index 4f02720ce7fe08909e50df4f887b3699456fc948..b763a689a1132d756f6fd22957daae2b35dab3b0 100644 (file)
@@ -703,7 +703,9 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
       }
    }
 
-   if (ctx->Extensions.EXT_texture_format_BGRA8888) {
+   /* GL_BGRA can be an internal format *only* in OpenGL ES (1.x or 2.0).
+    */
+   if (ctx->API != API_OPENGL) {
       switch (internalFormat) {
       case GL_BGRA:
         RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
index 65fe23cac0dbd3701fb1215f1a438b7e29768b0e..daa71fd7b1a937e2a40458f8dcb30ae1357f1830 100644 (file)
@@ -149,9 +149,11 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
          ; /* fallthrough */
    }
 
-   if (ctx->Extensions.EXT_texture_format_BGRA8888) {
+   /* GL_BGRA can be an internal format *only* in OpenGL ES (1.x or 2.0).
+    */
+   if (ctx->API != API_OPENGL) {
       switch (internalFormat) {
-         case GL_BGRA_EXT:
+         case GL_BGRA:
             return GL_RGBA;
          default:
             ; /* fallthrough */
index 7f9a948680e53de17713a93ba3e8508321a3b3cb..ef284ad70c392db4dec8b4d3f21adce074363dea 100644 (file)
@@ -281,8 +281,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
    ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
    ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
-   if (ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2)
-          ctx->Extensions.EXT_texture_format_BGRA8888 = GL_TRUE;
 
    ctx->Extensions.APPLE_vertex_array_object = GL_TRUE;