[Mesa-dev] [PATCH 2/7] mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_format
Ian Romanick
idr at freedesktop.org
Tue Sep 13 15:40:04 PDT 2011
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
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 cb4a5b4..f07418d 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -512,6 +512,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 */
}
--
1.7.6
More information about the mesa-dev
mailing list