|
|
@ -253,7 +253,7 @@ static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data)
|
|
|
|
VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore;
|
|
|
|
VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore;
|
|
|
|
VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
|
|
|
|
VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
|
|
|
|
err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
|
|
|
|
err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
|
|
|
|
if (err == VK_ERROR_OUT_OF_DATE_KHR)
|
|
|
|
if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
g_SwapChainRebuild = true;
|
|
|
|
g_SwapChainRebuild = true;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -326,7 +326,7 @@ static void FramePresent(ImGui_ImplVulkanH_Window* wd)
|
|
|
|
info.pSwapchains = &wd->Swapchain;
|
|
|
|
info.pSwapchains = &wd->Swapchain;
|
|
|
|
info.pImageIndices = &wd->FrameIndex;
|
|
|
|
info.pImageIndices = &wd->FrameIndex;
|
|
|
|
VkResult err = vkQueuePresentKHR(g_Queue, &info);
|
|
|
|
VkResult err = vkQueuePresentKHR(g_Queue, &info);
|
|
|
|
if (err == VK_ERROR_OUT_OF_DATE_KHR)
|
|
|
|
if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
g_SwapChainRebuild = true;
|
|
|
|
g_SwapChainRebuild = true;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|