summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-05-11 12:07:10 -0400
committerKristian Høgsberg <[email protected]>2010-05-11 14:06:22 -0400
commit199b0894b501607bf8d599ef5efc08cd6c08c79d (patch)
tree7c545c23739311eee3c8897b2a1d3b7ee09dae92 /src/mesa/main/texcompress.c
parent08e443a1c8218e43dcd953859843d95d9020a892 (diff)
mesa: Optimize get.c by using a table-driven approach
Diffstat (limited to 'src/mesa/main/texcompress.c')
-rw-r--r--src/mesa/main/texcompress.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index cff6de89ee3..f4b1119eb17 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -107,6 +107,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
}