anv: Use vk_object_alloc/free
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123>
This commit is contained in:

committed by
Marge Bot

parent
22478bb0e4
commit
c43109c07b
@@ -161,12 +161,10 @@ VkResult genX(CreateQueryPool)(
|
||||
assert(!"Invalid query type");
|
||||
}
|
||||
|
||||
if (!vk_multialloc_alloc2(&ma, &device->vk.alloc,
|
||||
pAllocator,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT))
|
||||
if (!vk_object_multialloc(&device->vk, &ma, pAllocator,
|
||||
VK_OBJECT_TYPE_QUERY_POOL))
|
||||
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
|
||||
vk_object_base_init(&device->vk, &pool->base, VK_OBJECT_TYPE_QUERY_POOL);
|
||||
pool->type = pCreateInfo->queryType;
|
||||
pool->pipeline_statistics = pipeline_statistics;
|
||||
pool->stride = uint64s_per_slot * sizeof(uint64_t);
|
||||
@@ -255,8 +253,7 @@ void genX(DestroyQueryPool)(
|
||||
return;
|
||||
|
||||
anv_device_release_bo(device, pool->bo);
|
||||
vk_object_base_finish(&pool->base);
|
||||
vk_free2(&device->vk.alloc, pAllocator, pool);
|
||||
vk_object_free(&device->vk, pAllocator, pool);
|
||||
}
|
||||
|
||||
#if GFX_VER >= 8
|
||||
|
Reference in New Issue
Block a user