pan/midgard: Allow COMPUTE jobs in panfrost_bo_access_for_stage
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 12 Oct 2019 15:30:52 +0000 (11:30 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 16 Oct 2019 12:17:56 +0000 (08:17 -0400)
Fixes: ada752afe40 ("panfrost: Extend the panfrost_batch_add_bo() API to pass access flags")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_bo.h

index 022a56d9ca3487a80fe2ac7ee16fda4d0d97fe7e..78e9b7526e01a0c3ebcd3872aba72b86a1a0b7f8 100644 (file)
@@ -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 :