docs: update RHI API docs
This commit is contained in:
42
docs/api/rhi/d3d12/query-heap/initialize.md
Normal file
42
docs/api/rhi/d3d12/query-heap/initialize.md
Normal 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)
|
||||
Reference in New Issue
Block a user