radv: use the base object struct types

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4886>
This commit is contained in:
Samuel Pitoiset
2020-04-29 14:57:20 +02:00
parent 65458528fc
commit 178adfa6a8
12 changed files with 138 additions and 7 deletions

View File

@@ -578,6 +578,9 @@ VkResult radv_CreatePipelineCache(
if (cache == NULL)
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
vk_object_base_init(&device->vk, &cache->base,
VK_OBJECT_TYPE_PIPELINE_CACHE);
if (pAllocator)
cache->alloc = *pAllocator;
else
@@ -608,6 +611,7 @@ void radv_DestroyPipelineCache(
return;
radv_pipeline_cache_finish(cache);
vk_object_base_finish(&cache->base);
vk_free2(&device->vk.alloc, pAllocator, cache);
}