vulkan,anv: Add a base object struct type

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
This commit is contained in:
Jason Ekstrand
2020-04-21 12:33:16 -05:00
committed by Marge Bot
parent 369703774c
commit 682c81bdfb
15 changed files with 160 additions and 13 deletions
+2
View File
@@ -106,6 +106,7 @@ VkResult genX(CreateQueryPool)(
if (pool == NULL)
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);
@@ -152,6 +153,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);
}