Module: Mesa Branch: 9.2 Commit: 601926515e5ef263b32e0d87addd4bf2c0d0b899 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=601926515e5ef263b32e0d87addd4bf2c0d0b899
Author: Ian Romanick <[email protected]> Date: Mon Aug 19 13:16:54 2013 -0700 mesa: Only advertise GL_ETC1_RGB8_OES in ES contexts 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 <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit 40550c8cedbcca508fb05baa7b7d480e6a60c51f) --- src/mesa/main/texcompress.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) 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; } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
