vk/allocator: Add an anv_state_pool_finish function
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 31 Jul 2015 17:30:57 +0000 (10:30 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 31 Jul 2015 17:38:28 +0000 (10:38 -0700)
Currently this is a no-op but it gives us a place to put finalization
things in the future.

src/vulkan/anv_allocator.c
src/vulkan/anv_device.c
src/vulkan/anv_private.h

index d85b919154d573d025428178b4e710fc29203943..463660f12c056b50bd2ed7424b180158d25aa370 100644 (file)
@@ -456,6 +456,11 @@ anv_state_pool_init(struct anv_state_pool *pool,
    }
 }
 
+void
+anv_state_pool_finish(struct anv_state_pool *pool)
+{
+}
+
 struct anv_state
 anv_state_pool_alloc(struct anv_state_pool *pool, size_t size, size_t align)
 {
index f633108895e437b9f377854a2ee18ef4963bd468..0c05c33f62641d2626852495520277d847d29c1c 100644 (file)
@@ -652,8 +652,10 @@ VkResult anv_DestroyDevice(
 #endif
 
    anv_bo_pool_finish(&device->batch_bo_pool);
+   anv_state_pool_finish(&device->dynamic_state_pool);
    anv_block_pool_finish(&device->dynamic_state_block_pool);
    anv_block_pool_finish(&device->instruction_block_pool);
+   anv_state_pool_finish(&device->surface_state_pool);
    anv_block_pool_finish(&device->surface_state_block_pool);
    anv_block_pool_finish(&device->scratch_block_pool);
 
index 12f826c1ab192a63a75b804b596429cda8b88250..563d7a573bdeaa323eefe58e33e9034955545efa 100644 (file)
@@ -299,6 +299,7 @@ uint32_t anv_block_pool_alloc(struct anv_block_pool *pool);
 void anv_block_pool_free(struct anv_block_pool *pool, uint32_t offset);
 void anv_state_pool_init(struct anv_state_pool *pool,
                          struct anv_block_pool *block_pool);
+void anv_state_pool_finish(struct anv_state_pool *pool);
 struct anv_state anv_state_pool_alloc(struct anv_state_pool *pool,
                                       size_t state_size, size_t alignment);
 void anv_state_pool_free(struct anv_state_pool *pool, struct anv_state state);