diff options
author | Kristian Høgsberg <[email protected]> | 2010-04-24 19:34:57 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-04-28 14:05:18 -0400 |
commit | 7179a822628963d8cfa0817cf072c5acb70638a7 (patch) | |
tree | 454d57a7c685dbea8d4ae46306b11455259ffeb0 /src/mesa/main/teximage.c | |
parent | 08fae07f5246052dccdd89689e27dc8820a24ff7 (diff) |
mesa: Move support for paletted textures to main/teximage.c
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b31ca86f11d..0c583ed14d3 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -46,6 +46,7 @@ #include "texfetch.h" #include "teximage.h" #include "texstate.h" +#include "texpal.h" #include "mtypes.h" @@ -3408,7 +3409,6 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, } } - void GLAPIENTRY _mesa_CompressedTexImage2DARB(GLenum target, GLint level, GLenum internalFormat, GLsizei width, @@ -3424,6 +3424,24 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, _mesa_lookup_enum_by_nr(internalFormat), width, height, border, imageSize, data); +#if FEATURE_ES + switch (internalFormat) { + case GL_PALETTE4_RGB8_OES: + case GL_PALETTE4_RGBA8_OES: + case GL_PALETTE4_R5_G6_B5_OES: + case GL_PALETTE4_RGBA4_OES: + case GL_PALETTE4_RGB5_A1_OES: + case GL_PALETTE8_RGB8_OES: + case GL_PALETTE8_RGBA8_OES: + case GL_PALETTE8_R5_G6_B5_OES: + case GL_PALETTE8_RGBA4_OES: + case GL_PALETTE8_RGB5_A1_OES: + _mesa_cpal_compressed_teximage2d(target, level, internalFormat, + width, height, imageSize, data); + return; + } +#endif + if (target == GL_TEXTURE_2D || (ctx->Extensions.ARB_texture_cube_map && target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && |