D3D12: Implement ClearRenderTarget by tracking bound RTV handles
- Add m_boundRenderTargets and m_boundDepthStencil members to D3D12CommandList - SetRenderTargetsHandle now saves bound RTV handles for later clear operations - ClearRenderTargetView(ID3D12Resource*, ...) clears all bound render targets - Reset() clears bound targets list - Follows D3D12 best practice: RTV is bound via OMSetRenderTargets, then cleared
This commit is contained in:
@@ -118,6 +118,10 @@ private:
|
||||
ID3D12PipelineState* m_currentPipelineState;
|
||||
ID3D12RootSignature* m_currentRootSignature;
|
||||
ID3D12DescriptorHeap* m_currentDescriptorHeap;
|
||||
|
||||
std::vector<D3D12_CPU_DESCRIPTOR_HANDLE> m_boundRenderTargets;
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE m_boundDepthStencil;
|
||||
bool m_depthStencilBound = false;
|
||||
};
|
||||
|
||||
} // namespace RHI
|
||||
|
||||
Reference in New Issue
Block a user