Merge pull request #119971 from DarioSamo/d3d12-command-list-creation-fix
Don't use CreateCommandList1 on D3D12.
This commit is contained in:
@@ -2577,18 +2577,9 @@ RDD::CommandBufferID RenderingDeviceDriverD3D12::command_buffer_create(CommandPo
|
||||
|
||||
ComPtr<ID3D12GraphicsCommandList> cmd_list;
|
||||
{
|
||||
ComPtr<ID3D12Device4> device_4;
|
||||
device->QueryInterface(device_4.GetAddressOf());
|
||||
HRESULT res = E_FAIL;
|
||||
if (device_4) {
|
||||
res = device_4->CreateCommandList1(0, list_type, D3D12_COMMAND_LIST_FLAG_NONE, IID_PPV_ARGS(cmd_list.GetAddressOf()));
|
||||
} else {
|
||||
res = device->CreateCommandList(0, list_type, cmd_allocator.Get(), nullptr, IID_PPV_ARGS(cmd_list.GetAddressOf()));
|
||||
}
|
||||
HRESULT res = device->CreateCommandList(0, list_type, cmd_allocator.Get(), nullptr, IID_PPV_ARGS(cmd_list.GetAddressOf()));
|
||||
ERR_FAIL_COND_V_MSG(!SUCCEEDED(res), CommandBufferID(), "CreateCommandList failed with error " + vformat("0x%08ux", (uint64_t)res) + ".");
|
||||
if (!device_4) {
|
||||
cmd_list->Close();
|
||||
}
|
||||
cmd_list->Close();
|
||||
}
|
||||
|
||||
CPUDescriptorHeapPool::Allocation uav_alloc;
|
||||
|
||||
Reference in New Issue
Block a user