Mesa (master): pan/midgard: Allow COMPUTE jobs in panfrost_bo_access_for_stage

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 16 12:18:35 UTC 2019


Module: Mesa
Branch: master
Commit: 01a78dbbabb5be3aef2d3856a8d06f524b5b4cfc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=01a78dbbabb5be3aef2d3856a8d06f524b5b4cfc

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Sat Oct 12 11:30:52 2019 -0400

pan/midgard: Allow COMPUTE jobs in panfrost_bo_access_for_stage

Fixes: ada752afe40 ("panfrost: Extend the panfrost_batch_add_bo() API to pass access flags")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/pan_bo.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_bo.h b/src/gallium/drivers/panfrost/pan_bo.h
index 022a56d9ca3..78e9b7526e0 100644
--- a/src/gallium/drivers/panfrost/pan_bo.h
+++ b/src/gallium/drivers/panfrost/pan_bo.h
@@ -108,11 +108,17 @@ struct panfrost_bo {
         uint32_t gpu_access;
 };
 
+/* If a BO is accessed for a particular shader stage, will it be in the primary
+ * batch (vertex/tiler) or the secondary batch (fragment)? Anything but
+ * fragment will be primary, e.g. compute jobs will be considered
+ * "vertex/tiler" by analogy */
+
 static inline uint32_t
 panfrost_bo_access_for_stage(enum pipe_shader_type stage)
 {
         assert(stage == PIPE_SHADER_FRAGMENT ||
-               stage == PIPE_SHADER_VERTEX);
+               stage == PIPE_SHADER_VERTEX ||
+               stage == PIPE_SHADER_COMPUTE);
 
         return stage == PIPE_SHADER_FRAGMENT ?
                PAN_BO_ACCESS_FRAGMENT :




More information about the mesa-commit mailing list