feat: 添加CommandList常量和DSV支持,完善RenderContext
This commit is contained in:
@@ -751,6 +751,22 @@ void D3D12CommandList::SetGraphicsDescriptorTable(uint32_t rootParameterIndex, u
|
||||
m_commandList->SetGraphicsRootDescriptorTable(rootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE{ baseDescriptor });
|
||||
}
|
||||
|
||||
void D3D12CommandList::SetGraphicsRootConstantBufferView(uint32_t slot, IResource* buffer) {
|
||||
if (buffer) {
|
||||
D3D12Resource* d3dBuffer = static_cast<D3D12Resource*>(buffer);
|
||||
m_commandList->SetGraphicsRootConstantBufferView(slot, d3dBuffer->GetNative()->GetGPUVirtualAddress());
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12CommandList::SetGraphicsRootConstantBufferViewCBV(uint32_t slot, void* nativeResource) {
|
||||
ID3D12Resource* resource = static_cast<ID3D12Resource*>(nativeResource);
|
||||
m_commandList->SetGraphicsRootConstantBufferView(slot, resource->GetGPUVirtualAddress());
|
||||
}
|
||||
|
||||
void D3D12CommandList::SetGraphicsRoot32BitConstants(uint32_t rootParameterIndex, uint32_t num32BitValues, const void* data, uint32_t destOffsetIn32BitValues) {
|
||||
m_commandList->SetGraphicsRoot32BitConstants(rootParameterIndex, num32BitValues, data, destOffsetIn32BitValues);
|
||||
}
|
||||
|
||||
void D3D12CommandList::SetComputeDescriptorTable(uint32_t rootParameterIndex, uint64_t baseDescriptor) {
|
||||
m_commandList->SetComputeRootDescriptorTable(rootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE{ baseDescriptor });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user