diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2011-09-12 11:37:50 -0500 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2011-09-19 10:04:46 -0700 |
commit | fc0fa16be3792bdabad0993fc4026bf621d6092f (patch) | |
tree | 2b9fb0e6e2ae06bd11a7968131f0074ba6dccb33 /src/mesa | |
parent | a454c835fa4f1d243f9e2072007dd52cf0d71dac (diff) | |
download | external_mesa3d-fc0fa16be3792bdabad0993fc4026bf621d6092f.zip external_mesa3d-fc0fa16be3792bdabad0993fc4026bf621d6092f.tar.gz external_mesa3d-fc0fa16be3792bdabad0993fc4026bf621d6092f.tar.bz2 |
mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_format
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | 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 6113b2e..76dcd9c 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -511,6 +511,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 */ } |