From 701eb56f5e0cdaf94ac44df2baac2f8923fa7e58 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 17 Jun 2025 08:57:36 +0200 Subject: [PATCH] Fix #140129: Vulkan: Race condition render graph submission When queueing render graphs for submission the adding of the queue was not guarded. This could still introduce a race condition, although very unlikely. Co-authored-by: Jorn Visser Pull Request: https://projects.blender.org/blender/blender/pulls/140517 --- source/blender/gpu/vulkan/vk_device_submission.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/gpu/vulkan/vk_device_submission.cc b/source/blender/gpu/vulkan/vk_device_submission.cc index beba66247ea..cf564e5f244 100644 --- a/source/blender/gpu/vulkan/vk_device_submission.cc +++ b/source/blender/gpu/vulkan/vk_device_submission.cc @@ -74,9 +74,8 @@ TimelineValue VKDevice::render_graph_submit(render_graph::VKRenderGraph *render_ timeline = submit_task->timeline = submit_to_device ? ++timeline_value_ : timeline_value_ + 1; orphaned_data.timeline_ = timeline; orphaned_data.move_data(context_discard_pool, timeline); + BLI_thread_queue_push(submitted_render_graphs_, submit_task); } - - BLI_thread_queue_push(submitted_render_graphs_, submit_task); submit_task = nullptr; if (wait_for_submission) {