Mesa (7.11): mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_format
Ian Romanick
idr at kemper.freedesktop.org
Wed Oct 26 01:42:06 UTC 2011
Module: Mesa
Branch: 7.11
Commit: 625fdf58c6fae4c34453a6a6e077293b2fb6ef11
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=625fdf58c6fae4c34453a6a6e077293b2fb6ef11
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Mon Sep 12 11:37:50 2011 -0500
mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_format
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Tested-by: Jin Yang <jin.a.yang at intel.com>
(cherry picked from commit fc0fa16be3792bdabad0993fc4026bf621d6092f)
---
src/mesa/main/teximage.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 6f53686..0339fd4 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -528,6 +528,25 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
+ if (ctx->API == API_OPENGLES) {
+ switch (internalFormat) {
+ case GL_PALETTE4_RGB8_OES:
+ case GL_PALETTE4_R5_G6_B5_OES:
+ case GL_PALETTE8_RGB8_OES:
+ case GL_PALETTE8_R5_G6_B5_OES:
+ return GL_RGB;
+ case GL_PALETTE4_RGBA8_OES:
+ case GL_PALETTE8_RGB5_A1_OES:
+ case GL_PALETTE4_RGBA4_OES:
+ case GL_PALETTE4_RGB5_A1_OES:
+ case GL_PALETTE8_RGBA8_OES:
+ case GL_PALETTE8_RGBA4_OES:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
return -1; /* error */
}
More information about the mesa-commit
mailing list