diff options
author | Jason Ekstrand <[email protected]> | 2015-12-02 03:28:27 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-12-03 13:43:53 -0800 |
commit | fcfb404a5860c67129e3672768cc557c0e4a1f12 (patch) | |
tree | c3af43297c0e1b348053f59a65fa3a0350d6f67f /src/vulkan/anv_query.c | |
parent | d3547e733443f406ff505e5f9f9790de0ae16907 (diff) |
vk/0.210.0: Rework allocation to use the new pAllocator's
Diffstat (limited to 'src/vulkan/anv_query.c')
-rw-r--r-- | src/vulkan/anv_query.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/vulkan/anv_query.c b/src/vulkan/anv_query.c index 7aa54363aee..cbceacf7f8e 100644 --- a/src/vulkan/anv_query.c +++ b/src/vulkan/anv_query.c @@ -32,6 +32,7 @@ VkResult anv_CreateQueryPool( VkDevice _device, const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { ANV_FROM_HANDLE(anv_device, device, _device); @@ -50,8 +51,8 @@ VkResult anv_CreateQueryPool( unreachable(""); } - pool = anv_device_alloc(device, sizeof(*pool), 8, - VK_SYSTEM_ALLOC_TYPE_API_OBJECT); + pool = anv_alloc2(&device->alloc, pAllocator, sizeof(*pool), 8, + VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (pool == NULL) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); @@ -67,21 +68,22 @@ VkResult anv_CreateQueryPool( return VK_SUCCESS; fail: - anv_device_free(device, pool); + anv_free2(&device->alloc, pAllocator, pool); return result; } void anv_DestroyQueryPool( VkDevice _device, - VkQueryPool _pool) + VkQueryPool _pool, + const VkAllocationCallbacks* pAllocator) { ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(anv_query_pool, pool, _pool); anv_gem_munmap(pool->bo.map, pool->bo.size); anv_gem_close(device, pool->bo.gem_handle); - anv_device_free(device, pool); + anv_free2(&device->alloc, pAllocator, pool); } VkResult anv_GetQueryPoolResults( |