aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texcompress.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-15 21:23:25 +0100
committermarha <marha@users.sourceforge.net>2014-01-15 21:23:25 +0100
commit1b0fcca503ae9cf2d462b60770f96c794dfbb27a (patch)
treed08c81de02b94da202195d84c99e192bc24ae69e /mesalib/src/mesa/main/texcompress.c
parentaaeb8bf497c82efabc4f9b27c319042c0e72d816 (diff)
downloadvcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.gz
vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.bz2
vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.zip
mesa xkeyboard-config xserver git update 15 jan 2014
xserver commit 2d2d49dab5c5718989de97d7227aac793479745e xkeyboard-config commit 78af7aa79c6552924295644b911e45d07a0fcdad mesa commit a05c596a00916ce6a9c9d35ff36cd1e401fddd43
Diffstat (limited to 'mesalib/src/mesa/main/texcompress.c')
-rw-r--r--mesalib/src/mesa/main/texcompress.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/texcompress.c b/mesalib/src/mesa/main/texcompress.c
index e71d0c411..47ad30605 100644
--- a/mesalib/src/mesa/main/texcompress.c
+++ b/mesalib/src/mesa/main/texcompress.c
@@ -263,6 +263,43 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
else {
n += 3;
}
+
+ /* The ES and desktop GL specs diverge here.
+ *
+ * In desktop OpenGL, the driver can perform online compression of
+ * uncompressed texture data. GL_NUM_COMPRESSED_TEXTURE_FORMATS and
+ * GL_COMPRESSED_TEXTURE_FORMATS give the application a list of
+ * formats that it could ask the driver to compress with some
+ * expectation of quality. The GL_ARB_texture_compression spec
+ * calls this "suitable for general-purpose usage." As noted
+ * above, this means GL_COMPRESSED_RGBA_S3TC_DXT1_EXT is not
+ * included in the list.
+ *
+ * In OpenGL ES, the driver never performs compression.
+ * GL_NUM_COMPRESSED_TEXTURE_FORMATS and
+ * GL_COMPRESSED_TEXTURE_FORMATS give the application a list of
+ * formats that the driver can receive from the application. It
+ * is the *complete* list of formats. The
+ * GL_EXT_texture_compression_s3tc spec says:
+ *
+ * "New State for OpenGL ES 2.0.25 and 3.0.2 Specifications
+ *
+ * The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
+ * COMPRESSED_TEXTURE_FORMATS include
+ * COMPRESSED_RGB_S3TC_DXT1_EXT,
+ * COMPRESSED_RGBA_S3TC_DXT1_EXT,
+ * COMPRESSED_RGBA_S3TC_DXT3_EXT, and
+ * COMPRESSED_RGBA_S3TC_DXT5_EXT."
+ *
+ * Note that the addition is only to the OpenGL ES specification!
+ */
+ if (_mesa_is_gles(ctx)) {
+ if (formats) {
+ formats[n++] = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
+ } else {
+ n += 1;
+ }
+ }
}
/* The GL_OES_compressed_ETC1_RGB8_texture spec says: