Skip to content

Commit b9badb5

Browse files
committed
Backends: Vulkan: removed misleading code incrementing frameindex. (ocornut#7834)
Thanks NostraMagister!
1 parent c0ae325 commit b9badb5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

backends/imgui_impl_vulkan.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ static void ImGui_ImplVulkan_RenderWindow(ImGuiViewport* viewport, void*)
18201820
vd->SwapChainNeedRebuild = false;
18211821
}
18221822

1823-
ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex];
1823+
ImGui_ImplVulkanH_Frame* fd = nullptr;
18241824
ImGui_ImplVulkanH_FrameSemaphores* fsd = &wd->FrameSemaphores[wd->SemaphoreIndex];
18251825
{
18261826
{
@@ -1983,8 +1983,6 @@ static void ImGui_ImplVulkan_SwapBuffers(ImGuiViewport* viewport, void*)
19831983
{
19841984
check_vk_result(err);
19851985
}
1986-
1987-
wd->FrameIndex = (wd->FrameIndex + 1) % wd->ImageCount; // This is for the next vkWaitForFences()
19881986
wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores
19891987
}
19901988

0 commit comments

Comments
 (0)