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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
33
engine/src/RHI/OpenGL/OpenGLCommandQueue.cpp
Normal file
33
engine/src/RHI/OpenGL/OpenGLCommandQueue.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLCommandQueue.h"
|
||||
|
||||
namespace XCEngine {
|
||||
namespace RHI {
|
||||
|
||||
OpenGLCommandQueue::OpenGLCommandQueue() {
|
||||
}
|
||||
|
||||
OpenGLCommandQueue::~OpenGLCommandQueue() {
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
void OpenGLCommandQueue::Shutdown() {
|
||||
}
|
||||
|
||||
void OpenGLCommandQueue::ExecuteCommandLists(uint32_t count, void** lists) {
|
||||
}
|
||||
|
||||
void OpenGLCommandQueue::Signal(RHIFence* fence, uint64_t value) {
|
||||
}
|
||||
|
||||
void OpenGLCommandQueue::Wait(RHIFence* fence, uint64_t value) {
|
||||
}
|
||||
|
||||
uint64_t OpenGLCommandQueue::GetCompletedValue() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OpenGLCommandQueue::WaitForIdle() {
|
||||
}
|
||||
|
||||
} // namespace RHI
|
||||
} // namespace XCEngine
|
||||
Reference in New Issue
Block a user