summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2011-01-26 15:05:46 -0500
committerKristian Høgsberg <[email protected]>2011-01-26 15:05:46 -0500
commit3fe0185ba506b830b86f0e39d2e366400ecffae6 (patch)
treeb7bd060401d1236fc3b9ffc08f0a16fdf717efb8 /src/mesa/main/texformat.c
parente28ecdee0396cc6665f9be95cfbaa2c2db1d4891 (diff)
mesa: Support internalFormat=GL_BGRA for DRI drivers
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 146b2b340e7..2542cea856b 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -591,6 +591,17 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
}
}
+ if (ctx->Extensions.EXT_texture_format_BGRA8888) {
+ switch (internalFormat) {
+ case GL_BGRA:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+
+ default:
+ ; /* fallthrough */
+ }
+ }
+
_mesa_problem(ctx, "unexpected format in _mesa_choose_tex_format()");
return MESA_FORMAT_NONE;
}