feat(RHI): 实现 RHICommandQueue 抽象基类
This commit is contained in:
@@ -36,13 +36,17 @@ void D3D12CommandQueue::Shutdown() {
|
||||
m_commandQueue.Reset();
|
||||
}
|
||||
|
||||
void D3D12CommandQueue::ExecuteCommandLists(uint32_t count, ID3D12CommandList** lists) {
|
||||
void D3D12CommandQueue::ExecuteCommandLists(uint32_t count, void** lists) {
|
||||
ExecuteCommandListsInternal(count, reinterpret_cast<ID3D12CommandList**>(lists));
|
||||
}
|
||||
|
||||
void D3D12CommandQueue::ExecuteCommandListsInternal(uint32_t count, ID3D12CommandList** lists) {
|
||||
m_commandQueue->ExecuteCommandLists(count, lists);
|
||||
}
|
||||
|
||||
void D3D12CommandQueue::Signal(D3D12Fence* fence, uint64_t value) {
|
||||
void D3D12CommandQueue::Signal(RHIFence* fence, uint64_t value) {
|
||||
if (fence) {
|
||||
m_commandQueue->Signal(fence->GetFence(), value);
|
||||
m_commandQueue->Signal(static_cast<D3D12Fence*>(fence)->GetFence(), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,9 +56,9 @@ void D3D12CommandQueue::Signal(ID3D12Fence* fence, uint64_t value) {
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12CommandQueue::Wait(D3D12Fence* fence, uint64_t value) {
|
||||
void D3D12CommandQueue::Wait(RHIFence* fence, uint64_t value) {
|
||||
if (fence) {
|
||||
m_commandQueue->Wait(fence->GetFence(), value);
|
||||
m_commandQueue->Wait(static_cast<D3D12Fence*>(fence)->GetFence(), value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user