diff options
author | Gurchetan Singh <[email protected]> | 2019-01-29 18:46:11 -0800 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-02-01 10:01:59 +0000 |
commit | db24132d801e913b41d0af2ebffaa11e7724d1a4 (patch) | |
tree | e29e6974923cbdfe4a084701fbdd29cc32ea8f8a /src/mesa/main | |
parent | 0f3a8e1b64f52586e904b42e2d73148d8547713a (diff) |
mesa/main: Expose EXT_texture_compression_s3tc_srgb
Required for the following test:
bin/compressedteximage GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT
pass when emulating GL on GLES.
Reviewed-by: Erik Faye-Lund <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/extensions_table.h | 1 | ||||
-rw-r--r-- | src/mesa/main/glformats.c | 3 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index f0a37d57559..4ae5ab97fb9 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -285,6 +285,7 @@ EXT(EXT_texture_compression_dxt1 , ANGLE_texture_compression_dxt 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 , 30, 2004) EXT(EXT_texture_compression_s3tc , EXT_texture_compression_s3tc , GLL, GLC, x , ES2, 2000) +EXT(EXT_texture_compression_s3tc_srgb , EXT_texture_compression_s3tc_srgb , x , x, x , ES2, 2016) 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 3a916009735..ea72cab5b3e 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1373,7 +1373,8 @@ _mesa_is_compressed_format(const struct gl_context *ctx, GLenum format) if (_mesa_get_format_color_encoding(m_format) == GL_LINEAR) { return _mesa_has_EXT_texture_compression_s3tc(ctx); } else { - return _mesa_has_EXT_texture_sRGB(ctx) && + return (_mesa_has_EXT_texture_sRGB(ctx) || + _mesa_has_EXT_texture_compression_s3tc_srgb(ctx)) && _mesa_has_EXT_texture_compression_s3tc(ctx); } case MESA_FORMAT_LAYOUT_FXT1: diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 794b7b8f73e..dda96cd2f19 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4270,6 +4270,7 @@ struct gl_extensions GLboolean EXT_texture_array; GLboolean EXT_texture_compression_latc; GLboolean EXT_texture_compression_s3tc; + GLboolean EXT_texture_compression_s3tc_srgb; GLboolean EXT_texture_env_dot3; GLboolean EXT_texture_filter_anisotropic; GLboolean EXT_texture_integer; |