st/mesa: Make transcode_astc also check for non-SRGB format support

This is probably unnecessary in that all drivers which support the sRGB
format likely also support the non-sRGB format.  But we may as well
check both the formats we use, for documentation if nothing else.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15875>
This commit is contained in:
Kenneth Graunke 2022-02-15 12:44:30 -08:00 committed by Marge Bot
parent 7d474c100e
commit d4521a2515

View file

@ -572,6 +572,9 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
PIPE_BIND_SAMPLER_VIEW);
st->transcode_astc = options->transcode_astc &&
screen->is_format_supported(screen, PIPE_FORMAT_DXT5_SRGBA,
PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW);
st->has_astc_2d_ldr =