2026-04-10 18:08:37 +08:00
|
|
|
# RenderSurface::GetDepthStateAfter
|
|
|
|
|
|
2026-04-10 18:25:06 +08:00
|
|
|
返回深度附件在本次渲染结束后期望落到的状态。
|
|
|
|
|
|
2026-04-10 18:08:37 +08:00
|
|
|
```cpp
|
|
|
|
|
RHI::ResourceStates GetDepthStateAfter() const;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 返回值
|
|
|
|
|
|
2026-04-10 18:25:06 +08:00
|
|
|
- 返回内部保存的深度附件“结束状态”;默认值是 `RHI::ResourceStates::DepthWrite`。
|
2026-04-10 18:08:37 +08:00
|
|
|
|
|
|
|
|
## 当前语义
|
|
|
|
|
|
2026-04-10 18:25:06 +08:00
|
|
|
- 某些支持自动 depth barrier 的路径会把它当作从 `DepthWrite` 或其他中间状态恢复出去的目标。
|
|
|
|
|
- 它常与 [GetDepthStateBefore](GetDepthStateBefore.md) 共同描述一次渲染阶段对深度附件的进入/退出约定。
|
2026-04-10 18:08:37 +08:00
|
|
|
|
2026-04-10 18:25:06 +08:00
|
|
|
## 当前实现边界
|
2026-04-10 18:08:37 +08:00
|
|
|
|
2026-04-10 18:25:06 +08:00
|
|
|
- 这里返回的是 surface 记录值,不是对真实资源状态的反查。
|
|
|
|
|
- 不同 pass 是否消费它并不完全一致。
|
2026-04-10 18:08:37 +08:00
|
|
|
|
|
|
|
|
## 相关文档
|
|
|
|
|
|
|
|
|
|
- [RenderSurface](RenderSurface.md)
|
|
|
|
|
- [SetDepthStateAfter](SetDepthStateAfter.md)
|
|
|
|
|
- [GetDepthStateBefore](GetDepthStateBefore.md)
|
|
|
|
|
- [IsAutoTransitionEnabled](IsAutoTransitionEnabled.md)
|