Mesa (main): panfrost: Control tiler memory usage
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 7 15:24:27 UTC 2022
Module: Mesa
Branch: main
Commit: d11351c616d15e00c91b5c3ca1543bf18e92e836
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d11351c616d15e00c91b5c3ca1543bf18e92e836
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Mar 31 10:39:51 2022 -0400
panfrost: Control tiler memory usage
Ensure we don't hit OOM when rendering at 8192x8192 on Valhall by disabling
the smallest bin size of the hierarchy mask.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15795>
---
src/panfrost/lib/pan_cs.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/panfrost/lib/pan_cs.c b/src/panfrost/lib/pan_cs.c
index b76d408595c..76e69f43021 100644
--- a/src/panfrost/lib/pan_cs.c
+++ b/src/panfrost/lib/pan_cs.c
@@ -867,6 +867,15 @@ GENX(pan_emit_tiler_ctx)(const struct panfrost_device *dev,
pan_pack(out, TILER_CONTEXT, tiler) {
/* TODO: Select hierarchy mask more effectively */
tiler.hierarchy_mask = (max_levels >= 8) ? 0xFF : 0x28;
+
+ /* For large framebuffers, disable the smallest bin size to
+ * avoid pathological tiler memory usage. Required to avoid OOM
+ * on dEQP-GLES31.functional.fbo.no_attachments.maximums.all on
+ * Mali-G57.
+ */
+ if (MAX2(fb_width, fb_height) >= 4096)
+ tiler.hierarchy_mask &= ~1;
+
tiler.fb_width = fb_width;
tiler.fb_height = fb_height;
tiler.heap = heap;
More information about the mesa-commit
mailing list