aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2015-08-27 16:05:22 -0700
committerNanley Chery <[email protected]>2015-09-15 10:00:00 -0700
commitfe796a18319d791f3ed3865761452474b1c0477f (patch)
tree59f73fd625d19e176c5b644fdabbdd2b5b0b9b73 /src/mesa/main/teximage.c
parentedfb7ed1099cc8b6bebc2f1cb0b7b71bdcdbedeb (diff)
mesa/extensions: restrict luminance alpha formats to API_OPENGL_COMPAT
According the GL 3.1 spec, luminance alpha formats are deprecated. Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index bfb0858b9bb..ff844cd24eb 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -534,7 +534,8 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
- if (ctx->Extensions.EXT_texture_compression_latc) {
+ if (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.EXT_texture_compression_latc) {
switch (internalFormat) {
case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
@@ -547,7 +548,8 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
- if (ctx->Extensions.ATI_texture_compression_3dc) {
+ if (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.ATI_texture_compression_3dc) {
switch (internalFormat) {
case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
return GL_LUMINANCE_ALPHA;