docs: update RHI API docs

This commit is contained in:
2026-03-20 02:35:45 +08:00
parent ea756c0177
commit 070b444f8f
501 changed files with 13493 additions and 2022 deletions

View File

@@ -0,0 +1,42 @@
# D3D12QueryHeap::Initialize
## 函数签名
```cpp
bool Initialize(ID3D12Device* device, QueryType type, uint32_t count)
```
## 中文描述
创建 D3D12 查询堆资源。根据指定的查询类型分配相应类型的 GPU 查询堆。
## 参数
| 参数 | 类型 | 描述 |
|------|------|------|
| `device` | `ID3D12Device*` | D3D12 设备指针 |
| `type` | `QueryType` | 查询类型Timestamp时间戳、Occlusion遮挡、PipelineStatistics管线统计 |
| `count` | `uint32_t` | 查询数量 |
## 返回值
`bool` - 初始化是否成功
## 示例
```cpp
D3D12QueryHeap timestampHeap;
if (timestampHeap.Initialize(device, QueryType::Timestamp, 1024)) {
// 时间戳查询堆创建成功
}
D3D12QueryHeap occlusionHeap;
if (occlusionHeap.Initialize(device, QueryType::Occlusion, 256)) {
// 遮挡查询堆创建成功
}
```
## 相关文档
- [D3D12QueryHeap](query-heap.md)
- [Shutdown](shutdown.md)