aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-03-23 19:10:06 -0400
committerMarge Bot <[email protected]>2020-03-31 01:12:26 +0000
commit02a638cc51491a827d852313e780ca0c35f699c9 (patch)
tree92d17ee98598c20f02e62ea225401b78dd78bbea /src/gallium
parentca8c62592c71885df653ecb008f5c0bad71420d4 (diff)
panfrost: Isolate panfrost_bo_access_for_stage to pan_cmdstream.c
We don't use it outside this file (and really shouldn't) and it has a strict Gallium dependency in pan_bo.h. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/panfrost/pan_bo.h17
-rw-r--r--src/gallium/drivers/panfrost/pan_cmdstream.c17
2 files changed, 17 insertions, 17 deletions
diff --git a/src/gallium/drivers/panfrost/pan_bo.h b/src/gallium/drivers/panfrost/pan_bo.h
index ba7bc23341d..ef9e7033a1c 100644
--- a/src/gallium/drivers/panfrost/pan_bo.h
+++ b/src/gallium/drivers/panfrost/pan_bo.h
@@ -115,23 +115,6 @@ 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_COMPUTE);
-
- return stage == PIPE_SHADER_FRAGMENT ?
- PAN_BO_ACCESS_FRAGMENT :
- PAN_BO_ACCESS_VERTEX_TILER;
-}
-
bool
panfrost_bo_wait(struct panfrost_bo *bo, int64_t timeout_ns,
uint32_t access_type);
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 8c2bcd25e2b..b84b4e2a5a3 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -34,6 +34,23 @@
#include "pan_context.h"
#include "pan_job.h"
+/* 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_COMPUTE);
+
+ return stage == PIPE_SHADER_FRAGMENT ?
+ PAN_BO_ACCESS_FRAGMENT :
+ PAN_BO_ACCESS_VERTEX_TILER;
+}
+
/* TODO: Bifrost requires just a mali_shared_memory, without the rest of the
* framebuffer */