mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-14 10:08:05 +02:00
anv: move bo_pool allocation flags to init caller
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25570>
This commit is contained in:
parent
787c29f2fc
commit
bab344645f
4 changed files with 9 additions and 8 deletions
|
|
@ -1083,14 +1083,11 @@ anv_state_reserved_pool_free(struct anv_state_reserved_pool *pool,
|
|||
|
||||
void
|
||||
anv_bo_pool_init(struct anv_bo_pool *pool, struct anv_device *device,
|
||||
const char *name)
|
||||
const char *name, enum anv_bo_alloc_flags alloc_flags)
|
||||
{
|
||||
pool->name = name;
|
||||
pool->device = device;
|
||||
pool->bo_alloc_flags =
|
||||
ANV_BO_ALLOC_MAPPED |
|
||||
ANV_BO_ALLOC_SNOOPED |
|
||||
ANV_BO_ALLOC_CAPTURE;
|
||||
pool->bo_alloc_flags = alloc_flags;
|
||||
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(pool->free_list); i++) {
|
||||
util_sparse_array_free_list_init(&pool->free_list[i],
|
||||
|
|
|
|||
|
|
@ -3228,7 +3228,10 @@ VkResult anv_CreateDevice(
|
|||
if (result != VK_SUCCESS)
|
||||
goto fail_queue_cond;
|
||||
|
||||
anv_bo_pool_init(&device->batch_bo_pool, device, "batch");
|
||||
anv_bo_pool_init(&device->batch_bo_pool, device, "batch",
|
||||
ANV_BO_ALLOC_MAPPED |
|
||||
ANV_BO_ALLOC_SNOOPED |
|
||||
ANV_BO_ALLOC_CAPTURE);
|
||||
|
||||
/* Because scratch is also relative to General State Base Address, we leave
|
||||
* the base address 0 and start the pool memory at an offset. This way we
|
||||
|
|
|
|||
|
|
@ -787,7 +787,7 @@ struct anv_bo_pool {
|
|||
};
|
||||
|
||||
void anv_bo_pool_init(struct anv_bo_pool *pool, struct anv_device *device,
|
||||
const char *name);
|
||||
const char *name, enum anv_bo_alloc_flags alloc_flags);
|
||||
void anv_bo_pool_finish(struct anv_bo_pool *pool);
|
||||
VkResult anv_bo_pool_alloc(struct anv_bo_pool *pool, uint32_t size,
|
||||
struct anv_bo **bo_out);
|
||||
|
|
|
|||
|
|
@ -442,7 +442,8 @@ anv_utrace_read_ts(struct u_trace_context *utctx,
|
|||
void
|
||||
anv_device_utrace_init(struct anv_device *device)
|
||||
{
|
||||
anv_bo_pool_init(&device->utrace_bo_pool, device, "utrace");
|
||||
anv_bo_pool_init(&device->utrace_bo_pool, device, "utrace",
|
||||
ANV_BO_ALLOC_MAPPED | ANV_BO_ALLOC_SNOOPED);
|
||||
intel_ds_device_init(&device->ds, device->info, device->fd,
|
||||
device->physical->local_minor,
|
||||
INTEL_DS_API_VULKAN);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue