=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: dxgi: Recreate Vulkan swapchain only when current buffer index is 0.

Alexandre Julliard julliard at winehq.org
Thu Feb 28 16:09:43 CST 2019


Module: wine
Branch: master
Commit: 0510bca6964a103c5d38d1f5b5eb2a2a72d6a2b9
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0510bca6964a103c5d38d1f5b5eb2a2a72d6a2b9

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Feb 27 16:05:01 2019 +0100

dxgi: Recreate Vulkan swapchain only when current buffer index is 0.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dxgi/swapchain.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c
index fb55820..3c09516 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");




More information about the wine-cvs mailing list