summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-08-31 11:43:39 -0700
committerIan Romanick <[email protected]>2011-09-26 12:14:14 -0700
commit29386d1f2d60e905d63f4c5f045ff3794b2ff99c (patch)
tree74c63a1767356ec4f9e6a3c4694720008c87d6fa /src/mesa
parent425284e88244e63a627b3fc4ae4514f064c71a83 (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions_es.c1
-rw-r--r--src/mesa/main/extensions.c5
-rw-r--r--src/mesa/main/mtypes.h2
-rw-r--r--src/mesa/main/texformat.c4
-rw-r--r--src/mesa/main/teximage.c6
-rw-r--r--src/mesa/state_tracker/st_extensions.c2
6 files changed, 9 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_extensions_es.c b/src/mesa/drivers/dri/intel/intel_extensions_es.c
index 6fcd047224b..bbc32203626 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions_es.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions_es.c
@@ -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
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 948027577a3..93dbff7c3a3 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -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),
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 866ec0a619a..360acea897d 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 4f02720ce7f..b763a689a11 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -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);
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 65fe23cac0d..daa71fd7b1a 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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 */
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 7f9a948680e..ef284ad70c3 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -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;