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 --- 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 07438f3e0376..89bcf5d95638 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;
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=48338
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)