diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/extensions_table.h | 2 | ||||
-rw-r--r-- | src/mesa/main/glformats.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index 09bf923bd0e..47db1583135 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -278,7 +278,7 @@ EXT(EXT_texture_buffer , OES_texture_buffer EXT(EXT_texture_compression_dxt1 , ANGLE_texture_compression_dxt , GLL, GLC, ES1, ES2, 2004) EXT(EXT_texture_compression_latc , EXT_texture_compression_latc , GLL, x , x , x , 2006) EXT(EXT_texture_compression_rgtc , ARB_texture_compression_rgtc , GLL, GLC, x , x , 2004) -EXT(EXT_texture_compression_s3tc , EXT_texture_compression_s3tc , GLL, GLC, x , x , 2000) +EXT(EXT_texture_compression_s3tc , EXT_texture_compression_s3tc , GLL, GLC, x , ES2, 2000) EXT(EXT_texture_cube_map , ARB_texture_cube_map , GLL, x , x , x , 2001) EXT(EXT_texture_cube_map_array , OES_texture_cube_map_array , x , x , x , 31, 2014) EXT(EXT_texture_edge_clamp , dummy_true , GLL, x , x , x , 1997) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 6cb3435dea2..f8fc36e9311 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2803,6 +2803,17 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, internalFormat = effectiveInternalFormat; } + /* The GLES variant of EXT_texture_compression_s3tc is very vague and + * doesn't list valid types. Just do exactly what the spec says. + */ + if (ctx->Extensions.EXT_texture_compression_s3tc && + (internalFormat == GL_COMPRESSED_RGB_S3TC_DXT1_EXT || + internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT || + internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT3_EXT || + internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT5_EXT)) + return format == GL_RGB || format == GL_RGBA ? GL_NO_ERROR : + GL_INVALID_OPERATION; + switch (format) { case GL_BGRA_EXT: if (type != GL_UNSIGNED_BYTE || internalFormat != GL_BGRA) |