mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 00:10:20 +01:00
vulkan/pipeline_cache: Do not consume object passed into remove_object.
Future use case will require removing an object with zero ref count, so leave it up to the caller to call unref. Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23877>
This commit is contained in:
parent
3774c3232c
commit
64c959e46c
1 changed files with 1 additions and 3 deletions
|
|
@ -164,9 +164,6 @@ vk_pipeline_cache_remove_object(struct vk_pipeline_cache *cache,
|
|||
_mesa_set_remove(cache->object_cache, entry);
|
||||
}
|
||||
vk_pipeline_cache_unlock(cache);
|
||||
|
||||
/* Drop our reference */
|
||||
vk_pipeline_cache_object_unref(cache->base.device, object);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -367,6 +364,7 @@ vk_pipeline_cache_lookup_object(struct vk_pipeline_cache *cache,
|
|||
"Deserializing pipeline cache object failed");
|
||||
|
||||
vk_pipeline_cache_remove_object(cache, hash, object);
|
||||
vk_pipeline_cache_object_unref(cache->base.device, object);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue