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>
This commit is contained in:
Józef Kucia 2019-02-27 16:05:01 +01:00 committed by Alexandre Julliard
parent b78f02922d
commit 0510bca696
1 changed files with 10 additions and 0 deletions

View File

@ -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");