panfrost: add max_4x_msaa quirk

Turns out, some Midgard GPUs don't support more than 4x MSAA. Add a
quirk for those GPUs, so don't expose it when it doesn't work.

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 15:01:52 +02:00 committed by Marge Bot
parent 3a78d9213b
commit 738b95a35e
3 changed files with 8 additions and 4 deletions

View file

@ -151,6 +151,9 @@ get_max_msaa(struct panfrost_device *dev, enum pipe_format format)
max_cbuf_atts, format_size);
assert(format_size > 16 || max_msaa >= 4);
if (dev->model->quirks.max_4x_msaa)
max_msaa = 4;
return max_msaa;
}

View file

@ -51,12 +51,12 @@
/* Table of supported Mali GPUs */
/* clang-format off */
const struct pan_model pan_model_list[] = {
MODEL(0x600, 0, "T600", "T60x", NO_ANISO, 8192, 8192),
MODEL(0x600, 0, "T600", "T60x", NO_ANISO, 8192, 8192, .max_4x_msaa = true),
MODEL(0x620, 0, "T620", "T62x", NO_ANISO, 8192, 8192),
MODEL(0x720, 0, "T720", "T72x", NO_ANISO, 8192, 8192, .no_hierarchical_tiling = true),
MODEL(0x720, 0, "T720", "T72x", NO_ANISO, 8192, 8192, .no_hierarchical_tiling = true, .max_4x_msaa = true),
MODEL(0x750, 0, "T760", "T76x", NO_ANISO, 8192, 8192),
MODEL(0x820, 0, "T820", "T82x", NO_ANISO, 8192, 8192, .no_hierarchical_tiling = true),
MODEL(0x830, 0, "T830", "T83x", NO_ANISO, 8192, 8192, .no_hierarchical_tiling = true),
MODEL(0x820, 0, "T820", "T82x", NO_ANISO, 8192, 8192, .no_hierarchical_tiling = true, .max_4x_msaa = true),
MODEL(0x830, 0, "T830", "T83x", NO_ANISO, 8192, 8192, .no_hierarchical_tiling = true, .max_4x_msaa = true),
MODEL(0x860, 0, "T860", "T86x", NO_ANISO, 8192, 8192),
MODEL(0x880, 0, "T880", "T88x", NO_ANISO, 8192, 8192),

View file

@ -77,6 +77,7 @@ struct pan_model {
* size for the entire framebuffer be selected by the driver
*/
bool no_hierarchical_tiling;
bool max_4x_msaa;
} quirks;
};