From 715a52a61cf8b21f658bc31aa8bde56c5a44af08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 6 Mar 2019 14:19:50 +0100 Subject: [PATCH] dxgi: Avoid recreating swapchain when we don't have user images. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/dxgi/swapchain.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index 991a505ef6f..cf084f7183c 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -2138,7 +2138,14 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_Present1(IDXGISwapChain3 *iface vr = d3d12_swapchain_acquire_next_image(swapchain); if (vr == VK_ERROR_OUT_OF_DATE_KHR) { + if (!d3d12_swapchain_have_user_images(swapchain)) + { + FIXME("Cannot recreate swapchain without user images.\n"); + return DXGI_STATUS_MODE_CHANGED; + } + TRACE("Recreating Vulkan swapchain.\n"); + d3d12_swapchain_destroy_buffers(swapchain, FALSE); return d3d12_swapchain_recreate_vulkan_swapchain(swapchain); }