panfrost: Extend the panfrost_batch_add_bo() API to pass access flags
[mesa.git] / src / gallium / drivers / panfrost / pan_job.h
index 3474a102f5a4c7e737a605b73d7d150c9247d15e..0b37a3131e86800a609852c610ba4fb1e4c86835 100644 (file)
@@ -109,6 +109,15 @@ struct panfrost_batch {
         /* Polygon list bound to the batch, or NULL if none bound yet */
         struct panfrost_bo *polygon_list;
 
+        /* Scratchpath BO bound to the batch, or NULL if none bound yet */
+        struct panfrost_bo *scratchpad;
+
+        /* Tiler heap BO bound to the batch, or NULL if none bound yet */
+        struct panfrost_bo *tiler_heap;
+
+        /* Dummy tiler BO bound to the batch, or NULL if none bound yet */
+        struct panfrost_bo *tiler_dummy;
+
         /* Framebuffer descriptor. */
         mali_ptr framebuffer;
 };
@@ -122,13 +131,14 @@ void
 panfrost_batch_init(struct panfrost_context *ctx);
 
 void
-panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo);
+panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo,
+                      uint32_t flags);
 
 void panfrost_batch_add_fbo_bos(struct panfrost_batch *batch);
 
 struct panfrost_bo *
 panfrost_batch_create_bo(struct panfrost_batch *batch, size_t size,
-                         uint32_t create_flags);
+                         uint32_t create_flags, uint32_t access_flags);
 
 void
 panfrost_batch_submit(struct panfrost_batch *batch);
@@ -139,6 +149,15 @@ panfrost_batch_set_requirements(struct panfrost_batch *batch);
 mali_ptr
 panfrost_batch_get_polygon_list(struct panfrost_batch *batch, unsigned size);
 
+struct panfrost_bo *
+panfrost_batch_get_scratchpad(struct panfrost_batch *batch);
+
+struct panfrost_bo *
+panfrost_batch_get_tiler_heap(struct panfrost_batch *batch);
+
+struct panfrost_bo *
+panfrost_batch_get_tiler_dummy(struct panfrost_batch *batch);
+
 void
 panfrost_batch_clear(struct panfrost_batch *batch,
                      unsigned buffers,