Mesa (staging/20.1): panfrost: Add Bifrost texture trampoline BO to batch

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 5 16:57:07 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 5a7b5ea4704d591ad89df6fe723ad47f5b36627c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a7b5ea4704d591ad89df6fe723ad47f5b36627c

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Fri May  1 11:37:56 2020 +0200

panfrost: Add Bifrost texture trampoline BO to batch

Fixes: d3eb23adb50c ("panfrost: Emit sampler descriptor on bifrost")
Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4832>
(cherry picked from commit 3a81abf3b2e6c08dea296d164d6e4429e5230d83)

---

 .pick_status.json                            | 2 +-
 src/gallium/drivers/panfrost/pan_cmdstream.c | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 695ec28b3fb..d39ba9d2636 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -580,7 +580,7 @@
         "description": "panfrost: Add Bifrost texture trampoline BO to batch",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "d3eb23adb50c621f49000191e6c024df01f090b7"
     },
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index dfc5174bef5..6c667d2017d 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -1272,10 +1272,16 @@ panfrost_emit_texture_descriptors(struct panfrost_batch *batch,
                         struct pipe_sampler_view *pview = &view->base;
                         struct panfrost_resource *rsrc = pan_resource(pview->texture);
 
+                        /* Add the BOs to the job so they are retained until the job is done. */
+
                         panfrost_batch_add_bo(batch, rsrc->bo,
                                               PAN_BO_ACCESS_SHARED | PAN_BO_ACCESS_READ |
                                               panfrost_bo_access_for_stage(stage));
 
+                        panfrost_batch_add_bo(batch, view->bifrost_bo,
+                                              PAN_BO_ACCESS_SHARED | PAN_BO_ACCESS_READ |
+                                              panfrost_bo_access_for_stage(stage));
+
                         memcpy(&descriptors[i], view->bifrost_descriptor, sizeof(*view->bifrost_descriptor));
                 }
 



More information about the mesa-commit mailing list