Mesa (main): st/mesa: Make transcode_astc also check for non-SRGB format support
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 13 08:47:10 UTC 2022
Module: Mesa
Branch: main
Commit: d4521a2515c16e7e1c876c4556821cddaae7bdd7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4521a2515c16e7e1c876c4556821cddaae7bdd7
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Feb 15 12:44:30 2022 -0800
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 at intel.com>
Reviewed-by: Emma Anholt <emma at anholt.net>
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15875>
---
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 =
More information about the mesa-commit
mailing list