feat(RHI): 实现 RHICommandQueue 抽象基类

This commit is contained in:
2026-03-17 17:54:44 +08:00
parent 14fb51e61e
commit 4638539f17
6 changed files with 181 additions and 17 deletions

View File

@@ -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);
}
}