panfrost: Isolate panfrost_bo_access_for_stage to pan_cmdstream.c
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 23 Mar 2020 23:10:06 +0000 (19:10 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 01:12:26 +0000 (01:12 +0000)
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 <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>

src/gallium/drivers/panfrost/pan_bo.h
src/gallium/drivers/panfrost/pan_cmdstream.c

index ba7bc23341d2603414c9d3812da3f6d577a663e4..ef9e7033a1c4a3ccadff904434fbed506d131014 100644 (file)
@@ -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);
index 8c2bcd25e2bbe82cf939a97d1bf8ebfb68b656d1..b84b4e2a5a37335efc82e31e5304a010ac6c2931 100644 (file)
 #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 */