mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
dxgi: Immediately error out when creating a D3D12 swapchain on a non-immediate queue.
This commit is contained in:
parent
494eec109b
commit
e946f610b2
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue