From b9badb597abfa90799b62124cf39e4a542e45565 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 15 Jan 2025 17:08:04 +0100 Subject: [PATCH] Backends: Vulkan: removed misleading code incrementing frameindex. (#7834) Thanks NostraMagister! --- backends/imgui_impl_vulkan.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backends/imgui_impl_vulkan.cpp b/backends/imgui_impl_vulkan.cpp index 0546ceb9d..1811cd16b 100644 --- a/backends/imgui_impl_vulkan.cpp +++ b/backends/imgui_impl_vulkan.cpp @@ -1820,7 +1820,7 @@ static void ImGui_ImplVulkan_RenderWindow(ImGuiViewport* viewport, void*) vd->SwapChainNeedRebuild = false; } - ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex]; + ImGui_ImplVulkanH_Frame* fd = nullptr; ImGui_ImplVulkanH_FrameSemaphores* fsd = &wd->FrameSemaphores[wd->SemaphoreIndex]; { { @@ -1983,8 +1983,6 @@ static void ImGui_ImplVulkan_SwapBuffers(ImGuiViewport* viewport, void*) { check_vk_result(err); } - - wd->FrameIndex = (wd->FrameIndex + 1) % wd->ImageCount; // This is for the next vkWaitForFences() wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores }