pan/afbc: Allow AFBC on UINT/SINT/SNORM types on v9+

Thanks to the decorrelation of compression mode and texture format,
AFBC is type-agnostic on v9+. We can thus safely allow UINT, SINT and
SNORM variants. The FLOAT variants are still not supported though.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158>
This commit is contained in:
Boris Brezillon 2025-09-04 15:12:44 +02:00 committed by Marge Bot
parent dc00bd9825
commit cbe461c930

View file

@ -525,6 +525,14 @@ pan_afbc_format(unsigned arch, enum pipe_format format, unsigned plane_idx)
*/
format = util_format_linear(format);
/* AFBC is type agnostic on v9+ (it just doesn't support float types except
* for D32 which is mapped to RGBA8 internally), but most of the following
* tests are done on UNORM for simplicity, so make sure we convert to _UNORM
* first in that case.
*/
if (arch >= 9 && !util_format_is_float(format))
format = util_format_any_to_unorm(format);
/* Luminance-alpha not supported for AFBC on v7+ */
switch (format) {
case PIPE_FORMAT_A8_UNORM: