From c8817abd4f5807237c2617defbd3a2bf11792024 Mon Sep 17 00:00:00 2001 From: Tom-Olsen Date: Sat, 30 May 2026 12:08:31 +0200 Subject: [PATCH] Backends: Vulkan: fix present semaphore reuse for secondary viewports. --- backends/imgui_impl_vulkan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/imgui_impl_vulkan.cpp b/backends/imgui_impl_vulkan.cpp index 8df12926f802..9c24323ede8e 100644 --- a/backends/imgui_impl_vulkan.cpp +++ b/backends/imgui_impl_vulkan.cpp @@ -2296,7 +2296,7 @@ static void ImGui_ImplVulkan_RenderWindow(ImGuiViewport* viewport, void*) info.commandBufferCount = 1; info.pCommandBuffers = &fd->CommandBuffer; info.signalSemaphoreCount = 1; - info.pSignalSemaphores = &fsd->RenderCompleteSemaphore; + info.pSignalSemaphores = &wd->FrameSemaphores[wd->FrameIndex].RenderCompleteSemaphore; err = vkEndCommandBuffer(fd->CommandBuffer); check_vk_result(err); @@ -2323,7 +2323,7 @@ static void ImGui_ImplVulkan_SwapBuffers(ImGuiViewport* viewport, void*) VkResult err; uint32_t present_index = wd->FrameIndex; - ImGui_ImplVulkanH_FrameSemaphores* fsd = &wd->FrameSemaphores[wd->SemaphoreIndex]; + ImGui_ImplVulkanH_FrameSemaphores* fsd = &wd->FrameSemaphores[wd->FrameIndex]; VkPresentInfoKHR info = {}; info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; info.waitSemaphoreCount = 1;