panfrost: Enable more tiler levels if we can
authorAlyssa Rosenzweig <alyssa@collabora.com>
Wed, 16 Jun 2021 17:29:53 +0000 (13:29 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 9 Jul 2021 23:15:28 +0000 (23:15 +0000)
Boosts glmark2 scores on Mali G52.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733>

src/panfrost/lib/pan_cs.c

index f5f42a9..2e7d770 100644 (file)
@@ -907,8 +907,12 @@ pan_emit_bifrost_tiler(const struct panfrost_device *dev,
                        mali_ptr heap,
                        void *out)
 {
+        unsigned max_levels = dev->tiler_features.max_levels;
+        assert(max_levels >= 2);
+
         pan_pack(out, BIFROST_TILER, tiler) {
-                tiler.hierarchy_mask = 0x28;
+                /* TODO: Select hierarchy mask more effectively */
+                tiler.hierarchy_mask = (max_levels >= 8) ? 0xFF : 0x28;
                 tiler.fb_width = fb_width;
                 tiler.fb_height = fb_height;
                 tiler.heap = heap;