anv: Drop bo_flags from anv_bo_pool
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 2 Dec 2019 18:02:12 +0000 (12:02 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 5 Dec 2019 16:58:14 +0000 (10:58 -0600)
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 <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h

index bd9289c1876bdbcc03efe28becafc2f6fb090667..f939a0c7c0e7a5759a76c5f970917a17aedfdb5e 100644 (file)
@@ -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,
index 0993a50507502ad62faf88e3f9852aeb998def68..87978b3d0860b988a2ce44c3af0e1e8081f362f7 100644 (file)
@@ -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);
index d42a3ccfdbff9e2b176387eb42f1292f3f12a27b..d4d14245501a4da83112d7e5075475c0f994db0b 100644 (file)
@@ -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);