From 8126e0287d4eaa9ce383cecfe253d589da7208f2 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 4 May 2023 15:29:39 +0200 Subject: [PATCH] vulkan/pipeline_cache: remove a bogus assert when inserting objects If two threads deserialize the raw object at the same time, the refcount could be more than 1 temporarily. This can be reproduced with Granite during the multi-threaded pipeline cache pre-warm on startup, and also with Dota2. Fixes: cbab396f549 ("vulkan/pipeline_cache: replace raw data objects on cache insertion of real objects") Signed-off-by: Samuel Pitoiset Part-of: --- src/vulkan/runtime/vk_pipeline_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/runtime/vk_pipeline_cache.c b/src/vulkan/runtime/vk_pipeline_cache.c index b16d5a0..bb6e472 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.c +++ b/src/vulkan/runtime/vk_pipeline_cache.c @@ -273,7 +273,7 @@ vk_pipeline_cache_insert_object(struct vk_pipeline_cache *cache, if (found_object->ops != object->ops) { /* The found object in the cache isn't fully formed. Replace it. */ assert(found_object->ops == &vk_raw_data_cache_object_ops); - assert(found_object->ref_cnt == 1 && object->ref_cnt == 1); + assert(object->ref_cnt == 1); entry->key = object; object = found_object; } -- 2.7.4