10 std::expected<Queue, std::string>
Queue::Create(ID3D12Device* device, D3D12_COMMAND_LIST_TYPE type,
11 std::wstring_view name, D3D12_COMMAND_QUEUE_PRIORITY priority) {
13 const D3D12_COMMAND_QUEUE_DESC desc{.Type = type, .Priority = priority};
14 HRESULT result = device->CreateCommandQueue(&desc, IID_PPV_ARGS(&queue.
m_queue));
18 result = device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&queue.
m_fence));
22 queue.
m_queue->SetName(std::wstring(name).c_str());
23 queue.
m_fence->SetName((std::wstring(name) + L
".fence").c_str());
static std::expected< Queue, std::string > Create(ID3D12Device *device, D3D12_COMMAND_LIST_TYPE type, std::wstring_view name, D3D12_COMMAND_QUEUE_PRIORITY priority=D3D12_COMMAND_QUEUE_PRIORITY_NORMAL)