[Mesa-dev] [PATCH 1/2] mesa: Only advertise GL_ETC1_RGB8_OES in ES contexts
Ian Romanick
idr at freedesktop.org
Mon Aug 19 16:38:15 PDT 2013
From: Ian Romanick <ian.d.romanick at intel.com>
There is no extension for this format in desktop GL, so an application
can't give the format back to glCompressedTexImage2D.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: "9.2" <mesa-stable at lists.freedesktop.org>
---
src/mesa/main/texcompress.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index 5885944..334ea40 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -277,7 +277,15 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
}
}
- if (ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
+ /* The GL_OES_compressed_ETC1_RGB8_texture spec says:
+ *
+ * "New State
+ *
+ * The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
+ * COMPRESSED_TEXTURE_FORMATS include ETC1_RGB8_OES."
+ */
+ if (_mesa_is_gles(ctx)
+ && ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
if (formats) {
formats[n++] = GL_ETC1_RGB8_OES;
}
--
1.8.1.4
More information about the mesa-dev
mailing list