Module: wine Branch: master Commit: 0510bca6964a103c5d38d1f5b5eb2a2a72d6a2b9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=0510bca6964a103c5d38d1f5b...
Author: Józef Kucia jkucia@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@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@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");