X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Ftexcompress.c;h=7a0b522a2d8ea0873c40187e6961e7cb0628887d;hb=751fe9058bc15f4f8608f0fdc02209542991ff23;hp=a4f1926ab3789d11351f242fd60a88de3688ab82;hpb=006a526edb0f5a67679309a867a1af22d94e1687;p=mesa.git diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c index a4f1926ab37..7a0b522a2d8 100644 --- a/src/mesa/main/texcompress.c +++ b/src/mesa/main/texcompress.c @@ -33,12 +33,10 @@ #include "glheader.h" #include "imports.h" #include "colormac.h" -#include "context.h" #include "formats.h" -#include "image.h" -#include "mipmap.h" +#include "mfeatures.h" +#include "mtypes.h" #include "texcompress.h" -#include "texstore.h" /** @@ -54,7 +52,7 @@ * \return number of formats. */ GLuint -_mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all) +_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats, GLboolean all) { GLuint n = 0; if (ctx->Extensions.TDFX_texture_compression_FXT1) { @@ -110,6 +108,24 @@ _mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all) } #endif /* FEATURE_EXT_texture_sRGB */ return n; + +#if FEATURE_ES1 || FEATURE_ES2 + if (formats) { + formats[n++] = GL_PALETTE4_RGB8_OES; + formats[n++] = GL_PALETTE4_RGBA8_OES; + formats[n++] = GL_PALETTE4_R5_G6_B5_OES; + formats[n++] = GL_PALETTE4_RGBA4_OES; + formats[n++] = GL_PALETTE4_RGB5_A1_OES; + formats[n++] = GL_PALETTE8_RGB8_OES; + formats[n++] = GL_PALETTE8_RGBA8_OES; + formats[n++] = GL_PALETTE8_R5_G6_B5_OES; + formats[n++] = GL_PALETTE8_RGBA4_OES; + formats[n++] = GL_PALETTE8_RGB5_A1_OES; + } + else { + n += 10; + } +#endif } @@ -164,7 +180,7 @@ _mesa_glenum_to_compressed_format(GLenum format) * internal format unchanged. */ GLenum -_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat) +_mesa_compressed_format_to_glenum(struct gl_context *ctx, GLuint mesaFormat) { switch (mesaFormat) { #if FEATURE_texture_fxt1