Make D3D12DescriptorHeap implement IDescriptorHeap interface

This commit is contained in:
2026-03-16 00:00:46 +08:00
parent f231e3dc18
commit 37750fda7d
2 changed files with 28 additions and 3 deletions

View File

@@ -58,5 +58,25 @@ D3D12_GPU_DESCRIPTOR_HANDLE D3D12DescriptorHeap::GetGPUDescriptorHandleForHeapSt
return m_descriptorHeap->GetGPUDescriptorHandleForHeapStart();
}
CPUDescriptorHandle D3D12DescriptorHeap::GetCPUDescriptorHandle(uint32_t index) {
CPUDescriptorHandle handle;
handle.ptr = GetCPUDescriptorHandle(index).ptr;
return handle;
}
GPUDescriptorHandle D3D12DescriptorHeap::GetGPUDescriptorHandle(uint32_t index) {
GPUDescriptorHandle handle;
handle.ptr = GetGPUDescriptorHandle(index).ptr;
return handle;
}
DescriptorType D3D12DescriptorHeap::GetType() const {
return static_cast<DescriptorType>(m_type);
}
uint32_t D3D12DescriptorHeap::GetDescriptorCount() const {
return m_numDescriptors;
}
} // namespace RHI
} // namespace XCEngine