41 lines
1009 B
Markdown
41 lines
1009 B
Markdown
|
|
# D3D12RootSignature::CreateDescriptorTable
|
|||
|
|
|
|||
|
|
## 函数签名
|
|||
|
|
|
|||
|
|
```cpp
|
|||
|
|
static D3D12_ROOT_PARAMETER CreateDescriptorTable(uint32_t numRanges, const D3D12_DESCRIPTOR_RANGE* ranges, ShaderVisibility visibility = ShaderVisibility::All)
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## 中文描述
|
|||
|
|
|
|||
|
|
创建描述符表根参数。
|
|||
|
|
|
|||
|
|
## 参数
|
|||
|
|
|
|||
|
|
| 参数 | 类型 | 描述 |
|
|||
|
|
|------|------|------|
|
|||
|
|
| `numRanges` | `uint32_t` | 描述符范围数量 |
|
|||
|
|
| `ranges` | `D3D12_DESCRIPTOR_RANGE*` | 描述符范围数组 |
|
|||
|
|
| `visibility` | `ShaderVisibility` | 可见性(默认 All) |
|
|||
|
|
|
|||
|
|
## 返回值
|
|||
|
|
|
|||
|
|
`D3D12_ROOT_PARAMETER` - 根参数
|
|||
|
|
|
|||
|
|
## 复杂度
|
|||
|
|
|
|||
|
|
O(1)
|
|||
|
|
|
|||
|
|
## 示例
|
|||
|
|
|
|||
|
|
```cpp
|
|||
|
|
D3D12_DESCRIPTOR_RANGE ranges[1];
|
|||
|
|
ranges[0] = D3D12RootSignature::CreateDescriptorRange(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, 0, 1);
|
|||
|
|
D3D12_ROOT_PARAMETER descTable = D3D12RootSignature::CreateDescriptorTable(1, ranges);
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## 相关文档
|
|||
|
|
|
|||
|
|
- [D3D12RootSignature](root-signature.md) - 类总览
|
|||
|
|
- [D3D12RootSignature::CreateDescriptorRange](create-descriptor-range.md) - 创建描述符范围
|