From: Benjamin Franzke Date: Fri, 21 Jan 2011 13:24:11 +0000 (+0100) Subject: mesa: allow internalFormat=GL_BGRA_EXT in TexImage2D X-Git-Tag: 062012170305~7647 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1452844fe2522387bbc6633f22aec09b8a06204;p=profile%2Fivi%2Fmesa.git mesa: allow internalFormat=GL_BGRA_EXT in TexImage2D --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 47d5093..c3cd6b6 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -183,6 +183,15 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) ; /* fallthrough */ } + if (ctx->Extensions.EXT_texture_format_BGRA8888) { + switch (internalFormat) { + case GL_BGRA_EXT: + return GL_RGBA; + default: + ; /* fallthrough */ + } + } + if (ctx->Extensions.EXT_paletted_texture) { switch (internalFormat) { case GL_COLOR_INDEX: