mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 21:21:06 +01:00 
			
		
		
		
	Viewports, Backends: Vulkan: handle VK_ERROR_OUT_OF_DATE_KHR when resizing secondary viewport (#3766, #3758)
Cannot repro here but appears to a user on Linux. Fix may be not super solid.
This commit is contained in:
		| @@ -1518,6 +1518,9 @@ static void ImGui_ImplVulkan_SwapBuffers(ImGuiViewport* viewport, void*) | ||||
|     info.pSwapchains = &wd->Swapchain; | ||||
|     info.pImageIndices = &present_index; | ||||
|     err = vkQueuePresentKHR(v->Queue, &info); | ||||
|     if (err == VK_ERROR_OUT_OF_DATE_KHR) | ||||
|         ImGui_ImplVulkanH_CreateOrResizeWindow(v->Instance, v->PhysicalDevice, v->Device, &data->Window, v->QueueFamily, v->Allocator, (int)viewport->Size.x, (int)viewport->Size.y, v->MinImageCount); | ||||
|     else | ||||
|         check_vk_result(err); | ||||
|  | ||||
|     wd->FrameIndex = (wd->FrameIndex + 1) % wd->ImageCount;         // This is for the next vkWaitForFences() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user