From cf28edd8bd7ad0a09bcede77890aa9f433ccaaf2 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 5 May 2025 16:13:40 +0200 Subject: [PATCH] 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 Part-of: --- src/panfrost/lib/pan_props.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/panfrost/lib/pan_props.h b/src/panfrost/lib/pan_props.h index 6351c37efc2..289a24ce20c 100644 --- a/src/panfrost/lib/pan_props.h +++ b/src/panfrost/lib/pan_props.h @@ -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