mesa: Remove EXT_bgra and EXT_texture_format_BGRA8888 extension enable flags

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>
This commit is contained in:
Ian Romanick
2011-08-31 11:43:39 -07:00
parent 425284e882
commit 29386d1f2d
6 changed files with 9 additions and 11 deletions

View 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

View 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),

View 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;

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

View 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 */

View 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;