mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
panfrost: Track the device through the pool
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
This commit is contained in:
parent
6ef7c05746
commit
34e0954f1d
3 changed files with 8 additions and 4 deletions
|
|
@ -40,9 +40,10 @@
|
|||
* 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
|
||||
};
|
||||
|
|
@ -85,7 +86,7 @@ panfrost_allocate_transient(struct panfrost_batch *batch, size_t sz)
|
|||
* 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 |
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ struct panfrost_batch;
|
|||
* 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;
|
||||
|
||||
|
|
@ -52,7 +55,7 @@ struct pan_pool {
|
|||
};
|
||||
|
||||
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 */
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ panfrost_create_batch(struct panfrost_context *ctx,
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue