30 lines
903 B
Markdown
30 lines
903 B
Markdown
# RenderSurface::SetDepthStateAfter
|
||
|
||
设置深度附件在本次渲染结束后期望落到的状态。
|
||
|
||
```cpp
|
||
void SetDepthStateAfter(RHI::ResourceStates state);
|
||
```
|
||
|
||
## 参数
|
||
|
||
- `state` - 调用方约定的深度附件结束资源状态。
|
||
|
||
## 当前语义
|
||
|
||
- 默认值是 `RHI::ResourceStates::DepthWrite`。
|
||
- 当某些 pass / renderer 在结束阶段恢复深度资源状态时,会把这里当作目标状态。
|
||
- `RenderSurface` 本身不会执行 barrier,也不会检查调用方是否声明正确。
|
||
|
||
## 当前实现边界
|
||
|
||
- 这是约定性元数据,不是后端状态跟踪器。
|
||
- 是否会在渲染结束后真正切回该状态,取决于具体消费该 `surface` 的路径。
|
||
|
||
## 相关文档
|
||
|
||
- [RenderSurface](RenderSurface.md)
|
||
- [GetDepthStateAfter](GetDepthStateAfter.md)
|
||
- [SetDepthStateBefore](SetDepthStateBefore.md)
|
||
- [IsAutoTransitionEnabled](IsAutoTransitionEnabled.md)
|