Module: wine Branch: master Commit: 0da481856bd7e6b1dd877209c69bba6c5d107b4f URL: https://source.winehq.org/git/wine.git/?a=commit;h=0da481856bd7e6b1dd877209c...
Author: Józef Kucia jkucia@codeweavers.com Date: Wed Feb 27 16:04:55 2019 +0100
dxgi: Always use user images instead of using Vulkan swapchain directly.
Some Vulkan drivers require that swapchain dimensions and window dimensions match exactly. Additionally, we want to have ability to change the presentation mode, and the only way to change the presentation mode in Vulkan is to recreate the swapchain.
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 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index 07438f3..89bcf5d 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -1293,18 +1293,19 @@ static HRESULT d3d12_swapchain_create_buffers(struct d3d12_swapchain *swapchain, resource_info.desc.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; resource_info.flags = VKD3D_RESOURCE_INITIAL_STATE_TRANSITION | VKD3D_RESOURCE_PRESENT_STATE_TRANSITION;
- if (vk_swapchain_format != vk_format) + queue_desc = ID3D12CommandQueue_GetDesc(queue); + if (queue_desc.Type != D3D12_COMMAND_LIST_TYPE_DIRECT) { - queue_desc = ID3D12CommandQueue_GetDesc(queue); - if (queue_desc.Type != D3D12_COMMAND_LIST_TYPE_DIRECT) - { - /* vkCmdBlitImage() is only supported for Graphics queues. */ - FIXME("Format conversion not implemented for command queue type %#x.\n", queue_desc.Type); + /* vkCmdBlitImage() is only supported for graphics queues. */ + FIXME("Swapchain blit not implemented for command queue type %#x.\n", queue_desc.Type); + if (vk_swapchain_format != vk_format) return E_NOTIMPL; - } - queue_family_index = vkd3d_get_vk_queue_family_index(queue); + } + queue_family_index = vkd3d_get_vk_queue_family_index(queue);
- TRACE("Creating user swapchain buffers for format conversion.\n"); + if (queue_desc.Type == D3D12_COMMAND_LIST_TYPE_DIRECT) + { + TRACE("Creating user swapchain buffers.\n");
if (FAILED(hr = d3d12_swapchain_create_user_buffers(swapchain, vk_format))) return hr;