From d4521a2515c16e7e1c876c4556821cddaae7bdd7 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 15 Feb 2022 12:44:30 -0800 Subject: [PATCH] st/mesa: Make transcode_astc also check for non-SRGB format support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Emma Anholt Reviewed-by: Nanley Chery Reviewed-by: Marek Olšák Part-of: --- src/mesa/state_tracker/st_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 5092600364b..1e79efde7b7 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -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 =