docs: update RHI API docs
This commit is contained in:
25
docs/api/rhi/d3d12/command-allocator/reset.md
Normal file
25
docs/api/rhi/d3d12/command-allocator/reset.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# D3D12CommandAllocator::Reset
|
||||
|
||||
```cpp
|
||||
void Reset();
|
||||
```
|
||||
|
||||
重置命令分配器,将分配器重置为初始状态,使其可以重新使用。此方法必须在 GPU 完成所有使用该分配器的命令后才能调用。
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12CommandAllocator allocator;
|
||||
if (allocator.Initialize(device)) {
|
||||
allocator.Reset(); // 重置以重新使用
|
||||
}
|
||||
```
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandAllocator 总览](command-allocator.md) - 返回类总览
|
||||
- [D3D12CommandAllocator::Initialize](initialize.md) - 初始化分配器
|
||||
Reference in New Issue
Block a user