[PATCH 08/10] dxgi: Recreate Vulkan swapchain only when current buffer index is 0.

Józef Kucia jkucia at codeweavers.com
Wed Feb 27 09:05:01 CST 2019


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/dxgi/swapchain.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c
index fb55820cb88f..3c0951635f69 100644
--- a/dlls/dxgi/swapchain.c
+++ b/dlls/dxgi/swapchain.c
@@ -1989,6 +1989,16 @@ static HRESULT d3d12_swapchain_set_sync_interval(struct d3d12_swapchain *swapcha
     if (swapchain->present_mode == present_mode)
         return S_OK;
 
+    /*
+     * We recreate the swapchain only when the current buffer index is 0, in order to preserve the
+     * expected back buffer index sequence.
+     */
+    if (swapchain->current_buffer_index)
+    {
+        WARN("Skipping sync interval change, current buffer index %u.\n", swapchain->current_buffer_index);
+        return S_OK;
+    }
+
     if (!swapchain->vk_images[swapchain->current_buffer_index])
     {
         FIXME("Cannot recreate swapchain without user images.\n");
-- 
2.19.2




More information about the wine-devel mailing list