Skip to content

Commit

Permalink
Backends: Vulkan: removed misleading code incrementing frameindex. (o…
Browse files Browse the repository at this point in the history
…cornut#7834)

Thanks NostraMagister!
  • Loading branch information
ocornut committed Jan 15, 2025
1 parent c0ae325 commit b9badb5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backends/imgui_impl_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
{
{
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit b9badb5

Please sign in to comment.