radv: reference pipeline cache object in radv_pipeline

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23878>
This commit is contained in:
Daniel Schürmann
2023-06-26 12:16:35 +02:00
committed by Marge Bot
parent 05269047d3
commit 3bd72eec1e
3 changed files with 16 additions and 5 deletions

View File

@@ -86,6 +86,9 @@ void
radv_pipeline_destroy(struct radv_device *device, struct radv_pipeline *pipeline,
const VkAllocationCallbacks *allocator)
{
if (pipeline->cache_object)
vk_pipeline_cache_object_unref(&device->vk, pipeline->cache_object);
switch (pipeline->type) {
case RADV_PIPELINE_GRAPHICS:
radv_destroy_graphics_pipeline(device, radv_pipeline_to_graphics(pipeline));