summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2015-08-27 16:05:22 -0700
committerNanley Chery <[email protected]>2015-09-15 10:11:14 -0700
commit82007936491d5fb99cdc5ea18c076e8a896a4a1e (patch)
treed2706fe46ab1d3e39b2b4c63b5f0fc88b0358c31 /src/mesa/main
parent48961fa3ba37999a6f8fd812458b735e39604a95 (diff)
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 <[email protected]> Signed-off-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/teximage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ff844cd24eb..2a4d29daf2f 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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;