docs: update RHI API docs
This commit is contained in:
34
docs/api/rhi/fence/getcompletedvalue.md
Normal file
34
docs/api/rhi/fence/getcompletedvalue.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# RHIFence::GetCompletedValue
|
||||
|
||||
```cpp
|
||||
virtual uint64_t GetCompletedValue() const = 0;
|
||||
```
|
||||
|
||||
获取围栏已完成的最大值。该值表示 GPU 已完成的所有信号操作中的最高值。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** 已完成的围栏值(`uint64_t`)
|
||||
|
||||
**线程安全**:✅
|
||||
|
||||
**复杂度**:O(1)
|
||||
|
||||
**示例**:
|
||||
|
||||
```cpp
|
||||
RHIFence* fence = device->CreateFence();
|
||||
|
||||
fence->Signal(100ULL);
|
||||
|
||||
uint64_t completed = fence->GetCompletedValue();
|
||||
// completed >= 100 表示 GPU 已完成该信号
|
||||
|
||||
if (completed >= 100) {
|
||||
// GPU 已完成 100 之前的所有工作
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHIFence](fence.md) - 返回类总览
|
||||
Reference in New Issue
Block a user