From c0c43709eaf8d08d6178c8b6ece16d9cc4cc12a7 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Sun, 23 May 2021 07:10:19 +1200 Subject: [PATCH] panfrost: Fix polygon list size computations As noted in f5c293425fa ("panfrost: Correct polygon size computations"), "We do have to be careful to add the header size to total comptued BO size." Fixes: ff3eada7eb4 ("panfrost: Use the generic preload and FB helpers in the gallium driver") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4660 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4737 Part-of: (cherry picked from commit fe9d37b0c6e89f11a5f25022a851da81d19dab73) --- .pick_status.json | 2 +- src/panfrost/lib/pan_tiler.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index f7681b55f89..ac28b63c99b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -220,7 +220,7 @@ "description": "panfrost: Fix polygon list size computations", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ff3eada7eb4e4df0abe93ee76b77101f9d24e72c" }, diff --git a/src/panfrost/lib/pan_tiler.c b/src/panfrost/lib/pan_tiler.c index 4493f5c01c9..e45240eeac6 100644 --- a/src/panfrost/lib/pan_tiler.c +++ b/src/panfrost/lib/pan_tiler.c @@ -389,5 +389,6 @@ panfrost_tiler_get_polygon_list_size(const struct panfrost_device *dev, unsigned hierarchy_mask = panfrost_choose_hierarchy_mask(fb_width, fb_height, 1, hierarchy); - return panfrost_tiler_full_size(fb_width, fb_height, hierarchy_mask, hierarchy); + return panfrost_tiler_full_size(fb_width, fb_height, hierarchy_mask, hierarchy) + + panfrost_tiler_header_size(fb_width, fb_height, hierarchy_mask, hierarchy); }