mesa/teximage: restrict GL_ETC1_RGB8_OES support to GLES

According to the extensions table and our glext headers,
OES_compressed_ETC1_RGB8_texture is only supported in
GLES1 and GLES2. Since we may give users a GLES3 context
when a GLES2 context is requested, we also allow this
extension for GLES3 as well.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
This commit is contained in:
Nanley Chery 2015-08-27 16:05:22 -07:00
parent 48961fa3ba
commit 8200793649
1 changed files with 2 additions and 1 deletions

View File

@ -558,7 +558,8 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
if (ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
if (_mesa_is_gles(ctx) &&
ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
switch (internalFormat) {
case GL_ETC1_RGB8_OES:
return GL_RGB;