Fixed incorrect links in RHI documentation: - Fixed OpenGL swap-chain docs with wrong references to threading/containers - Fixed OpenGL texture docs with incorrect buffer/ texture links - Fixed OpenGL vertex-array docs with wrong threading links - Fixed OpenGL sampler docs with wrong threading links - Fixed OpenGL device docs with incorrect swap-chain links - Fixed fence docs with incorrect command-queue links - Fixed command-list docs with missing shutdown link - Fixed get-framebuffer-size.md title mismatch Added missing documentation: - Created fence/wait.md - Created command-list/shutdown.md - Created swap-chain/resize.md - Created OpenGL sampler initialize.md, bind.md, unbind.md
47 lines
965 B
Markdown
47 lines
965 B
Markdown
# RHIFence
|
|
|
|
**命名空间**: `XCEngine::RHI`
|
|
|
|
**类型**: `class` (abstract)
|
|
|
|
**描述**: GPU 同步栅栏抽象接口,用于 GPU/CPU 同步和跨队列同步。
|
|
|
|
## 公共方法
|
|
|
|
### 生命周期
|
|
|
|
| 方法 | 文档 |
|
|
|------|------|
|
|
| `Shutdown` | [详细文档](shutdown.md) |
|
|
|
|
### 同步操作
|
|
|
|
| 方法 | 文档 |
|
|
|------|------|
|
|
| `Signal` | [详细文档](signal.md) |
|
|
| `Wait` | [详细文档](../../threading/task-group/wait.md) |
|
|
| `GetCompletedValue` | [详细文档](get-completed-value.md) |
|
|
| `IsSignaled` | [详细文档](is-signaled.md) |
|
|
|
|
### 其他
|
|
|
|
| 方法 | 文档 |
|
|
|------|------|
|
|
| `GetNativeHandle` | [详细文档](get-native-handle.md) |
|
|
|
|
## 使用示例
|
|
|
|
```cpp
|
|
FenceDesc desc;
|
|
desc.initialValue = 0;
|
|
RHIFence* fence = device->CreateFence(desc);
|
|
|
|
commandQueue->Signal(fence, 1);
|
|
fence->Wait(1);
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [../rhi/rhi.md](../rhi.md) - RHI 模块总览
|
|
- [RHICommandQueue](../command-queue/command-queue.md) - 命令队列
|