From: Erik Faye-Lund Date: Tue, 23 Aug 2022 12:48:39 +0000 (+0200) Subject: mesa/st: do not fall back to uncompressed for rgtc X-Git-Tag: upstream/22.3.5~3042 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f25875ce180573fccd46dcc693c4331c80b51401;p=platform%2Fupstream%2Fmesa.git mesa/st: do not fall back to uncompressed for rgtc This logic doesn't really do what it pretends to; we don't expose the RGTC features unless we actually have RGTC support. This is about to change, but for that logic to work, we need to be able to tell if we're using a fallback-format or not, and we can't do that unless we keep the format as RGTC. Reviewed-by: Alyssa Rosenzweig Acked-by: Eric Engestrom Tested-by: Eric Engestrom Part-of: --- diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 041d2c8..0762394 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -582,20 +582,28 @@ static const struct format_mapping format_map[] = { /* compressed R, RG formats */ { - { GL_COMPRESSED_RED, GL_COMPRESSED_RED_RGTC1, 0 }, + { GL_COMPRESSED_RED, 0 }, { PIPE_FORMAT_RGTC1_UNORM, PIPE_FORMAT_R8_UNORM, DEFAULT_RGBA_FORMATS } }, { + { GL_COMPRESSED_RED_RGTC1, 0 }, + { PIPE_FORMAT_RGTC1_UNORM, 0 } + }, + { { GL_COMPRESSED_SIGNED_RED_RGTC1, 0 }, - { PIPE_FORMAT_RGTC1_SNORM, DEFAULT_SNORM8_RGBA_FORMATS } + { PIPE_FORMAT_RGTC1_SNORM, 0 } }, { - { GL_COMPRESSED_RG, GL_COMPRESSED_RG_RGTC2, 0 }, + { GL_COMPRESSED_RG, 0 }, { PIPE_FORMAT_RGTC2_UNORM, PIPE_FORMAT_R8G8_UNORM, DEFAULT_RGBA_FORMATS } }, { + { GL_COMPRESSED_RG_RGTC2, 0 }, + { PIPE_FORMAT_RGTC2_UNORM, 0 } + }, + { { GL_COMPRESSED_SIGNED_RG_RGTC2, 0 }, - { PIPE_FORMAT_RGTC2_SNORM, DEFAULT_SNORM8_RGBA_FORMATS } + { PIPE_FORMAT_RGTC2_SNORM, 0 } }, { { GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_LATC1_EXT, 0 },