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

41 lines
1.1 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.
# RHIPipelineLayout
**命名空间**: `XCEngine::RHI`
**类型**: `class` (abstract)
**描述**: GPU 渲染管线布局抽象接口,用于定义着色器资源的绑定布局。
## 概述
`RHIPipelineLayout` 封装了管线布局Root Signature的创建和管理。管线布局定义了着色器程序期望的资源布局包括常量缓冲、纹理和采样器的绑定位置。
## 公共方法
### 生命周期
| 方法 | 描述 |
|------|------|
| `virtual bool Initialize(const RHIPipelineLayoutDesc& desc)` | 初始化管线布局 |
| `virtual void Shutdown()` | 释放管线布局资源 |
### 其他
| 方法 | 描述 |
|------|------|
| `virtual void* GetNativeHandle()` | 获取原生 API 句柄 |
## 管线布局描述 (RHIPipelineLayoutDesc)
| 成员 | 类型 | 描述 |
|------|------|------|
| `constantBufferCount` | `uint32_t` | 常量缓冲数量 |
| `textureCount` | `uint32_t` | 纹理数量 |
| `samplerCount` | `uint32_t` | 采样器数量 |
| `uavCount` | `uint32_t` | UAV 数量 |
## 相关文档
- [RHIDevice](./rhi-device.md) - 创建设备
- [RHIPipelineState](./rhi-pipeline-state.md) - 管线状态