[Mesa-dev] [PATCH] mesa: Allow MESA_FORMAT_LAYOUT_S3TC in non-desktop mesa

Tapani Pälli tapani.palli at intel.com
Wed May 17 07:36:19 UTC 2017


IMO this is not correct. Are you having problems with some application?

For Android games Mesa should already return true for the previous check 
(ANGLE_texture_compression_dxt) and things should work OK. The check you 
are touching is desktop specific because EXT_texture_sRGB is available 
only on desktop GL (closest gles equivalent being GL_EXT_sRGB which we 
don't support).


On 05/17/2017 10:22 AM, Gao Chun wrote:
> As s3tc formats are used in many Android games, desktop mesa
> check should be removed for MESA_FORMAT_LAYOUT_S3TC.
> ---
>   src/mesa/main/glformats.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
> index 4f240206ff45..e4f283c4dfa8 100644
> --- a/src/mesa/main/glformats.c
> +++ b/src/mesa/main/glformats.c
> @@ -1376,8 +1376,7 @@ _mesa_is_compressed_format(const struct gl_context *ctx, GLenum format)
>             */
>            return ctx->Extensions.ANGLE_texture_compression_dxt;
>         } else {
> -         return _mesa_is_desktop_gl(ctx)
> -            && ctx->Extensions.EXT_texture_sRGB
> +         return ctx->Extensions.EXT_texture_sRGB
>               && ctx->Extensions.EXT_texture_compression_s3tc;
>         }
>      case MESA_FORMAT_LAYOUT_FXT1:
> 


More information about the mesa-dev mailing list