From 0bba88081b416586d733878977da5950fa3e93d6 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 2 Dec 2019 12:02:12 -0600 Subject: [PATCH] anv: Drop bo_flags from anv_bo_pool In ee77938733cd, we started using the BO cache for anv_bo_pool and stopped using the bo_flags parameter. However, we never dropped it from the struct or the init function. Reviewed-by: Ivan Briano Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/anv_allocator.c | 4 +--- src/intel/vulkan/anv_device.c | 8 +------- src/intel/vulkan/anv_private.h | 5 +---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index bd9289c1876..f939a0c7c0e 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1264,11 +1264,9 @@ anv_state_stream_alloc(struct anv_state_stream *stream, } void -anv_bo_pool_init(struct anv_bo_pool *pool, struct anv_device *device, - uint64_t bo_flags) +anv_bo_pool_init(struct anv_bo_pool *pool, struct anv_device *device) { pool->device = device; - pool->bo_flags = bo_flags; for (unsigned i = 0; i < ARRAY_SIZE(pool->free_list); i++) { util_sparse_array_free_list_init(&pool->free_list[i], &device->bo_cache.bo_map, 0, diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 0993a505075..87978b3d086 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2616,17 +2616,11 @@ VkResult anv_CreateDevice( } pthread_condattr_destroy(&condattr); - uint64_t bo_flags = - (physical_device->supports_48bit_addresses ? EXEC_OBJECT_SUPPORTS_48B_ADDRESS : 0) | - (physical_device->has_exec_async ? EXEC_OBJECT_ASYNC : 0) | - (physical_device->has_exec_capture ? EXEC_OBJECT_CAPTURE : 0) | - (physical_device->use_softpin ? EXEC_OBJECT_PINNED : 0); - result = anv_bo_cache_init(&device->bo_cache); if (result != VK_SUCCESS) goto fail_queue_cond; - anv_bo_pool_init(&device->batch_bo_pool, device, bo_flags); + anv_bo_pool_init(&device->batch_bo_pool, device); result = anv_state_pool_init(&device->dynamic_state_pool, device, DYNAMIC_STATE_POOL_MIN_ADDRESS, 16384); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index d42a3ccfdbf..d4d14245501 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -900,13 +900,10 @@ anv_state_table_get(struct anv_state_table *table, uint32_t idx) struct anv_bo_pool { struct anv_device *device; - uint64_t bo_flags; - struct util_sparse_array_free_list free_list[16]; }; -void anv_bo_pool_init(struct anv_bo_pool *pool, struct anv_device *device, - uint64_t bo_flags); +void anv_bo_pool_init(struct anv_bo_pool *pool, struct anv_device *device); 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); -- 2.30.2