refactor(RHI): remove void* from CommandList interfaces and fix OpenGL MRT bug
- Remove void* parameters from RHICommandList abstract interface - TransitionBarrier, SetVertexBuffer, SetIndexBuffer, SetRenderTargets, ClearRenderTarget, ClearDepthStencil, CopyResource now use RHIResourceView* - SetPipelineState now uses RHIPipelineState* instead of void* - Simplified SetVertexBuffer to 3 params, SetIndexBuffer to 2 params - Add internal D3D12 APIs for native type support (low-level escape hatch) - Fix OpenGL SetRenderTargets to call glDrawBuffers for MRT support - Update tests to match new interface signatures All 289 RHI tests pass (158 unit + 64 OpenGL backend + 58 D3D12 backend + 8 integration + 1 disabled)
This commit is contained in:
@@ -468,11 +468,28 @@ D3D12DescriptorHeap* D3D12Device::CreateDescriptorHeap(const DescriptorHeapDesc&
|
||||
}
|
||||
|
||||
D3D12QueryHeap* D3D12Device::CreateQueryHeap(const QueryHeapDesc& desc) {
|
||||
return nullptr;
|
||||
auto* queryHeap = new D3D12QueryHeap();
|
||||
if (!queryHeap->Initialize(m_device.Get(), static_cast<QueryType>(desc.queryType), desc.count)) {
|
||||
delete queryHeap;
|
||||
return nullptr;
|
||||
}
|
||||
return queryHeap;
|
||||
}
|
||||
|
||||
D3D12RootSignature* D3D12Device::CreateRootSignature(const RootSignatureDesc& desc) {
|
||||
return nullptr;
|
||||
auto* rootSig = new D3D12RootSignature();
|
||||
|
||||
D3D12_ROOT_SIGNATURE_DESC rootSigDesc = {};
|
||||
rootSigDesc.NumParameters = 0;
|
||||
rootSigDesc.NumStaticSamplers = 0;
|
||||
rootSigDesc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
|
||||
|
||||
if (!rootSig->Initialize(m_device.Get(), rootSigDesc)) {
|
||||
delete rootSig;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return rootSig;
|
||||
}
|
||||
|
||||
D3D12CommandQueue* D3D12Device::CreateCommandQueueImpl(const CommandQueueDesc& desc) {
|
||||
|
||||
Reference in New Issue
Block a user