Mesa (main): panfrost: Move panfrost_emit_tile_map to pan_job

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 7 13:34:29 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue Jul  6 18:08:52 2021 -0400

panfrost: Move panfrost_emit_tile_map to pan_job

...where it's actually called. Saves us from using the vtable since this
isn't version-dependent.

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

---

 src/gallium/drivers/panfrost/pan_cmdstream.c | 19 -------------------
 src/gallium/drivers/panfrost/pan_job.c       | 19 +++++++++++++++++++
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 2c3b8490ca4..ae2bbd21af4 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -2412,25 +2412,6 @@ panfrost_initialize_surface(struct panfrost_batch *batch,
         }
 }
 
-void
-panfrost_emit_tile_map(struct panfrost_batch *batch, struct pan_fb_info *fb)
-{
-        if (batch->key.nr_cbufs < 1 || !batch->key.cbufs[0])
-                return;
-
-        struct pipe_surface *surf = batch->key.cbufs[0];
-        struct panfrost_resource *pres = surf ? pan_resource(surf->texture) : NULL;
-
-        if (pres && pres->damage.tile_map.enable) {
-                fb->tile_map.base =
-                        pan_pool_upload_aligned(&batch->pool.base,
-                                                pres->damage.tile_map.data,
-                                                pres->damage.tile_map.size,
-                                                64);
-                fb->tile_map.stride = pres->damage.tile_map.stride;
-        }
-}
-
 /* Generate a fragment job. This should be called once per frame. (According to
  * presentations, this is supposed to correspond to eglSwapBuffers) */
 
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 6c2938df162..d0b507a8b8e 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -826,6 +826,25 @@ done:
         return ret;
 }
 
+static void
+panfrost_emit_tile_map(struct panfrost_batch *batch, struct pan_fb_info *fb)
+{
+        if (batch->key.nr_cbufs < 1 || !batch->key.cbufs[0])
+                return;
+
+        struct pipe_surface *surf = batch->key.cbufs[0];
+        struct panfrost_resource *pres = surf ? pan_resource(surf->texture) : NULL;
+
+        if (pres && pres->damage.tile_map.enable) {
+                fb->tile_map.base =
+                        pan_pool_upload_aligned(&batch->pool.base,
+                                                pres->damage.tile_map.data,
+                                                pres->damage.tile_map.size,
+                                                64);
+                fb->tile_map.stride = pres->damage.tile_map.stride;
+        }
+}
+
 static void
 panfrost_batch_submit(struct panfrost_batch *batch,
                       uint32_t in_sync, uint32_t out_sync)



More information about the mesa-commit mailing list