Mesa (main): panfrost: Add generic mappings for the gen-specific tiler descriptor macros

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 26 08:52:46 UTC 2021


Module: Mesa
Branch: main
Commit: fe1d33daaf4548f81c86c0f2eb4fd9d6a89b95e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe1d33daaf4548f81c86c0f2eb4fd9d6a89b95e5

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Wed Aug  4 11:25:26 2021 +0200

panfrost: Add generic mappings for the gen-specific tiler descriptor macros

This way the transition to per-gen XML files gets simpler.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

---

 src/gallium/drivers/panfrost/pan_cmdstream.c | 4 ++--
 src/panfrost/lib/gen_macros.h                | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 29405f7fba7..da87963bf84 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -2602,13 +2602,13 @@ panfrost_batch_get_bifrost_tiler(struct panfrost_batch *batch, unsigned vertex_c
                 return batch->tiler_ctx.bifrost;
 
         struct panfrost_ptr t =
-                pan_pool_alloc_desc(&batch->pool.base, BIFROST_TILER_HEAP);
+                pan_pool_alloc_desc(&batch->pool.base, TILER_HEAP);
 
         pan_emit_bifrost_tiler_heap(dev, t.cpu);
 
         mali_ptr heap = t.gpu;
 
-        t = pan_pool_alloc_desc(&batch->pool.base, BIFROST_TILER);
+        t = pan_pool_alloc_desc(&batch->pool.base, TILER_CONTEXT);
         pan_emit_bifrost_tiler(dev, batch->key.width, batch->key.height,
                                util_framebuffer_get_num_samples(&batch->key),
                                heap, t.cpu);
diff --git a/src/panfrost/lib/gen_macros.h b/src/panfrost/lib/gen_macros.h
index 88225abc2d9..bef174f9fa7 100644
--- a/src/panfrost/lib/gen_macros.h
+++ b/src/panfrost/lib/gen_macros.h
@@ -61,10 +61,13 @@
 #define TILER_JOB BIFROST_TILER_JOB
 #define TEXTURE BIFROST_TEXTURE
 #define SAMPLER BIFROST_SAMPLER
+#define TILER_HEAP BIFROST_TILER_HEAP
+#define TILER_CONTEXT BIFROST_TILER
 #else
 #define TILER_JOB MIDGARD_TILER_JOB
 #define TEXTURE MIDGARD_TEXTURE
 #define SAMPLER MIDGARD_SAMPLER
+#define TILER_CONTEXT MIDGARD_TILER
 #endif
 
 /* Suffixing macros */



More information about the mesa-commit mailing list