Refactor D3D12: remove ICommandQueue, IFence dependencies
This commit is contained in:
@@ -36,23 +36,13 @@ void D3D12CommandQueue::Shutdown() {
|
||||
m_commandQueue.Reset();
|
||||
}
|
||||
|
||||
void D3D12CommandQueue::ExecuteCommandLists(uint32_t count, ICommandList** lists) {
|
||||
std::vector<ID3D12CommandList*> d3d12Lists(count);
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
if (lists[i]) {
|
||||
d3d12Lists[i] = reinterpret_cast<D3D12CommandList*>(lists[i])->GetCommandList();
|
||||
}
|
||||
}
|
||||
m_commandQueue->ExecuteCommandLists(count, d3d12Lists.data());
|
||||
}
|
||||
|
||||
void D3D12CommandQueue::ExecuteCommandLists(uint32_t count, ID3D12CommandList** lists) {
|
||||
m_commandQueue->ExecuteCommandLists(count, lists);
|
||||
}
|
||||
|
||||
void D3D12CommandQueue::Signal(IFence* fence, uint64_t value) {
|
||||
void D3D12CommandQueue::Signal(D3D12Fence* fence, uint64_t value) {
|
||||
if (fence) {
|
||||
m_commandQueue->Signal(reinterpret_cast<D3D12Fence*>(fence)->GetFence(), value);
|
||||
m_commandQueue->Signal(fence->GetFence(), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,9 +52,9 @@ void D3D12CommandQueue::Signal(ID3D12Fence* fence, uint64_t value) {
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12CommandQueue::Wait(IFence* fence, uint64_t value) {
|
||||
void D3D12CommandQueue::Wait(D3D12Fence* fence, uint64_t value) {
|
||||
if (fence) {
|
||||
m_commandQueue->Wait(reinterpret_cast<D3D12Fence*>(fence)->GetFence(), value);
|
||||
m_commandQueue->Wait(fence->GetFence(), value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user