Commit e946f610 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard

dxgi: Immediately error out when creating a D3D12 swapchain on a non-immediate queue.

parent 494eec10
......@@ -1474,7 +1474,6 @@ static void test_invalid_command_queue_types(void)
hr = IDXGIFactory_CreateSwapChain(factory, queue_unk, &swapchain_desc, &swapchain);
expected = queue_types[i] == D3D12_COMMAND_LIST_TYPE_DIRECT ? S_OK : DXGI_ERROR_INVALID_CALL;
todo_wine_if(queue_types[i] != D3D12_COMMAND_LIST_TYPE_DIRECT)
ok(hr == expected, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
......
......@@ -3071,6 +3071,7 @@ HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *qu
IDXGISwapChain1 **swapchain)
{
DXGI_SWAP_CHAIN_FULLSCREEN_DESC default_fullscreen_desc;
struct D3D12_COMMAND_QUEUE_DESC queue_desc;
struct d3d12_swapchain *object;
ID3D12Device *device;
HRESULT hr;
......@@ -3078,6 +3079,10 @@ HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *qu
if (swapchain_desc->Format == DXGI_FORMAT_UNKNOWN)
return DXGI_ERROR_INVALID_CALL;
queue_desc = ID3D12CommandQueue_GetDesc(queue);
if (queue_desc.Type != D3D12_COMMAND_LIST_TYPE_DIRECT)
return DXGI_ERROR_INVALID_CALL;
if (!fullscreen_desc)
{
memset(&default_fullscreen_desc, 0, sizeof(default_fullscreen_desc));
......
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