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 <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Tested-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18248>
This commit is contained in:
Erik Faye-Lund 2022-08-23 14:48:39 +02:00 committed by Marge Bot
parent 1735053de5
commit f25875ce18

View file

@ -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_SIGNED_RED_RGTC1, 0 },
{ PIPE_FORMAT_RGTC1_SNORM, DEFAULT_SNORM8_RGBA_FORMATS }
{ GL_COMPRESSED_RED_RGTC1, 0 },
{ PIPE_FORMAT_RGTC1_UNORM, 0 }
},
{
{ GL_COMPRESSED_RG, GL_COMPRESSED_RG_RGTC2, 0 },
{ GL_COMPRESSED_SIGNED_RED_RGTC1, 0 },
{ PIPE_FORMAT_RGTC1_SNORM, 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 },