* into the pool and copy there */
struct pan_pool
-panfrost_create_pool(void *memctx)
+panfrost_create_pool(void *memctx, struct panfrost_device *dev)
{
struct pan_pool pool = {
+ .dev = dev,
.transient_offset = 0,
.transient_bo = NULL
};
* flags to this function and keep the read/write,
* fragment/vertex+tiler pools separate.
*/
- bo = pan_bo_create(pan_device(batch->ctx->base.screen), bo_sz, 0);
+ bo = pan_bo_create(batch->pool.dev, bo_sz, 0);
uintptr_t flags = PAN_BO_ACCESS_PRIVATE |
PAN_BO_ACCESS_RW |
* command pool */
struct pan_pool {
+ /* Parent device for allocation */
+ struct panfrost_device *dev;
+
/* panfrost_bo -> access_flags owned by the pool */
struct hash_table *bos;
};
struct pan_pool
-panfrost_create_pool(void *memctx);
+panfrost_create_pool(void *memctx, struct panfrost_device *dev);
/* Represents a fat pointer for GPU-mapped memory, returned from the transient
* allocator and not used for much else */
batch->out_sync = panfrost_create_batch_fence(batch);
util_copy_framebuffer_state(&batch->key, key);
- batch->pool = panfrost_create_pool(batch);
+ batch->pool = panfrost_create_pool(batch, pan_device(ctx->base.screen));
return batch;
}