Commit 0da48185 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

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: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d7fd50b0
......@@ -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)
{
/* 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);
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment