panfrost: do not calculate max-msaa on v4

The V4 GPUs doesn't have the dynamic allocation logic that V5 and later
has. There's nothing to calculate here; the GPU either supports 8x MSAA,
or 4x MSAA.

Since 8x MSAA is the architectural max, let's have this function report
that. We deal with the 4x limit separately as a quirk, because this
applies to some V5 GPUs as well.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
This commit is contained in:
Erik Faye-Lund 2025-05-05 16:13:40 +02:00 committed by Marge Bot
parent 483ce5a1dc
commit cf28edd8bd

View file

@ -189,12 +189,15 @@ static inline unsigned
pan_get_max_msaa(unsigned arch, unsigned max_tib_size, unsigned max_cbuf_atts,
unsigned format_size)
{
if (arch < 5)
return 8;
assert(max_cbuf_atts > 0);
assert(format_size > 0);
const unsigned min_tile_size = arch >= 5 ? 4 * 4 : 16 * 16;
const unsigned min_tile_size = 4 * 4;
unsigned max_msaa = max_tib_size / (max_cbuf_atts * format_size *
min_tile_size);
return MIN2(max_msaa, arch >= 5 ? 16 : 8);
return MIN2(max_msaa, 16);
}
#endif