Module: Mesa Branch: staging/23.3 Commit: 7cf359fb57dd747c9ca0d933673bb2a993b2e4cf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7cf359fb57dd747c9ca0d933673bb2a993b2e4cf
Author: Friedrich Vock <[email protected]> Date: Sun Nov 12 21:00:04 2023 +0100 vulkan: Don't use set_foreach_remove when destroying pipeline caches set_foreach_remove assumes no entries have been removed. That assumption only holds if no errors occur, since pipeline cache objects can get removed if an error occurs during deserialization. This fixes dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic crashing on RADV. Cc: mesa-stable Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Faith Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26164> (cherry picked from commit 8ffdad731cd8d8900c10810b61283afffa142f29) --- .pick_status.json | 2 +- src/vulkan/runtime/vk_pipeline_cache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 96c65da5b57..6bbacbbc553 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5364,7 +5364,7 @@ "description": "vulkan: Don't use set_foreach_remove when destroying pipeline caches", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/vulkan/runtime/vk_pipeline_cache.c b/src/vulkan/runtime/vk_pipeline_cache.c index d5988952a5b..71471dd0239 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.c +++ b/src/vulkan/runtime/vk_pipeline_cache.c @@ -659,7 +659,7 @@ vk_pipeline_cache_destroy(struct vk_pipeline_cache *cache, { if (cache->object_cache) { if (!cache->weak_ref) { - set_foreach_remove(cache->object_cache, entry) { + set_foreach(cache->object_cache, entry) { vk_pipeline_cache_object_unref(cache->base.device, (void *)entry->key); } } else {
