panfrost: Rename panfrost_create_pool() into panfrost_pool_init()
[mesa.git] / src / gallium / drivers / panfrost / pan_job.c
index 115afade0b6dad677e115c9442576ce86e830629..43aee264b3c394d99eb8abffe719ba2382f4ff3f 100644 (file)
@@ -115,13 +115,12 @@ panfrost_create_batch(struct panfrost_context *ctx,
 
         /* Preallocate the main pool, since every batch has at least one job
          * structure so it will be used */
-        batch->pool = panfrost_create_pool(batch, dev, 0, true);
+        panfrost_pool_init(&batch->pool, batch, dev, 0, true);
 
         /* Don't preallocate the invisible pool, since not every batch will use
          * the pre-allocation, particularly if the varyings are larger than the
          * preallocation and a reallocation is needed after anyway. */
-        batch->invisible_pool =
-                panfrost_create_pool(batch, dev, PAN_BO_INVISIBLE, false);
+        panfrost_pool_init(&batch->invisible_pool, batch, dev, PAN_BO_INVISIBLE, false);
 
         panfrost_batch_add_fbo_bos(batch);
 
@@ -187,6 +186,8 @@ panfrost_free_batch(struct panfrost_batch *batch)
                 panfrost_batch_fence_unreference(*dep);
         }
 
+        util_dynarray_fini(&batch->dependencies);
+
         /* The out_sync fence lifetime is different from the the batch one
          * since other batches might want to wait on a fence of already
          * submitted/signaled batch. All we need to do here is make sure the
@@ -704,10 +705,10 @@ panfrost_batch_get_tiler_meta(struct panfrost_batch *batch, unsigned vertex_coun
             .flags = 0x0,
             .width = MALI_POSITIVE(batch->key.width),
             .height = MALI_POSITIVE(batch->key.height),
-            .tiler_heap_meta = panfrost_pool_upload(&batch->pool, &tiler_heap_meta, sizeof(tiler_heap_meta)),
+            .tiler_heap_meta = panfrost_pool_upload_aligned(&batch->pool, &tiler_heap_meta, sizeof(tiler_heap_meta), 64)
         };
 
-        batch->tiler_meta = panfrost_pool_upload(&batch->pool, &tiler_meta, sizeof(tiler_meta));
+        batch->tiler_meta = panfrost_pool_upload_aligned(&batch->pool, &tiler_meta, sizeof(tiler_meta), 64);
         return batch->tiler_meta;
 }
 
@@ -746,7 +747,7 @@ panfrost_batch_reserve_framebuffer(struct panfrost_batch *batch)
                         sizeof(struct mali_single_framebuffer) :
                         sizeof(struct mali_framebuffer);
 
-                batch->framebuffer = panfrost_pool_alloc(&batch->pool, size);
+                batch->framebuffer = panfrost_pool_alloc_aligned(&batch->pool, size, 64);
 
                 /* Tag the pointer */
                 if (!(dev->quirks & MIDGARD_SFBD))
@@ -868,8 +869,8 @@ panfrost_load_surface(struct panfrost_batch *batch, struct pipe_surface *surf, u
                 blend_shader = bo->gpu | b->first_tag;
         }
 
-        struct panfrost_transfer transfer = panfrost_pool_alloc(&batch->pool,
-                        4 * 4 * 6 * rsrc->damage.inverted_len);
+        struct panfrost_transfer transfer = panfrost_pool_alloc_aligned(&batch->pool,
+                        4 * 4 * 6 * rsrc->damage.inverted_len, 64);
 
         for (unsigned i = 0; i < rsrc->damage.inverted_len; ++i) {
                 float *o = (float *) (transfer.cpu + (4 * 4 * 6 * i));