Files
XCEngine/docs/api/rhi/rhi-pipeline-state.md

48 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RHIPipelineState
**命名空间**: `XCEngine::RHI`
**类型**: `class` (abstract)
**描述**: GPU 渲染管线状态抽象接口,封装了渲染管线的各种固定功能配置。
## 概述
`RHIPipelineState` 封装了渲染管线状态的创建和管理。管线状态对象PIPSO存储了 GPU 管线的不可变配置,包括着色器、混合状态、深度模板状态、光栅化状态等。
## 公共方法
### 生命周期
| 方法 | 描述 |
|------|------|
| `virtual void Shutdown()` | 释放管线状态对象 |
### 绑定/解绑
| 方法 | 描述 |
|------|------|
| `virtual void Bind()` | 绑定管线状态到管线 |
| `virtual void Unbind()` | 解绑管线状态 |
### 属性访问
| 方法 | 描述 |
|------|------|
| `virtual void* GetNativeHandle()` | 获取原生 API 句柄 |
| `virtual PipelineType GetType() const` | 获取管线类型 |
## 管线类型 (PipelineType)
| 枚举值 | 描述 |
|--------|------|
| `Graphics` | 图形渲染管线 |
| `Compute` | 计算管线 |
| `Raytracing` | 光线追踪管线 |
## 相关文档
- [RHIDevice](./rhi-device.md) - 创建设备
- [RHIShader](./rhi-shader.md) - 着色器
- [RHICommandList](./rhi-command-list.md) - 命令列表