fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
38
docs/api/rhi/d3d12/root-signature/create-32bit-constants.md
Normal file
38
docs/api/rhi/d3d12/root-signature/create-32bit-constants.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# D3D12RootSignature::Create32BitConstants
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
static D3D12_ROOT_PARAMETER Create32BitConstants(uint32_t shaderRegister, uint32_t num32BitValues, ShaderVisibility visibility = ShaderVisibility::All, uint32_t registerSpace = 0)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建 32 位常量根参数,用于上传小量常量数据。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `shaderRegister` | `uint32_t` | 着色器寄存器编号 |
|
||||
| `num32BitValues` | `uint32_t` | 32 位值的数量 |
|
||||
| `visibility` | `ShaderVisibility` | 可见性(默认 All) |
|
||||
| `registerSpace` | `uint32_t` | 寄存器空间(默认 0) |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12_ROOT_PARAMETER` - 根参数
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12_ROOT_PARAMETER constantsParam = D3D12RootSignature::Create32BitConstants(0, 4);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
39
docs/api/rhi/d3d12/root-signature/create-cbv.md
Normal file
39
docs/api/rhi/d3d12/root-signature/create-cbv.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# D3D12RootSignature::CreateCBV
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
static D3D12_ROOT_PARAMETER CreateCBV(uint32_t shaderRegister, ShaderVisibility visibility = ShaderVisibility::All, uint32_t registerSpace = 0)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建常量缓冲区视图(CBV)根参数。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `shaderRegister` | `uint32_t` | 着色器寄存器编号 |
|
||||
| `visibility` | `ShaderVisibility` | 可见性(默认 All) |
|
||||
| `registerSpace` | `uint32_t` | 寄存器空间(默认 0) |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12_ROOT_PARAMETER` - 根参数
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12_ROOT_PARAMETER cbvParam = D3D12RootSignature::CreateCBV(0);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
- [D3D12RootSignature::CreateSRV](create-srv.md) - 创建 SRV 根参数
|
||||
- [D3D12RootSignature::CreateUAV](create-uav.md) - 创建 UAV 根参数
|
||||
48
docs/api/rhi/d3d12/root-signature/create-desc.md
Normal file
48
docs/api/rhi/d3d12/root-signature/create-desc.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# D3D12RootSignature::CreateDesc
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
static D3D12_ROOT_SIGNATURE_DESC CreateDesc(
|
||||
D3D12_ROOT_PARAMETER* parameters,
|
||||
uint32_t parameterCount,
|
||||
D3D12_STATIC_SAMPLER_DESC* samplers = nullptr,
|
||||
uint32_t samplerCount = 0,
|
||||
D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建根签名描述符。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `parameters` | `D3D12_ROOT_PARAMETER*` | 根参数数组 |
|
||||
| `parameterCount` | `uint32_t` | 根参数数量 |
|
||||
| `samplers` | `D3D12_STATIC_SAMPLER_DESC*` | 静态采样器数组(可选) |
|
||||
| `samplerCount` | `uint32_t` | 静态采样器数量 |
|
||||
| `flags` | `D3D12_ROOT_SIGNATURE_FLAGS` | 根签名标志 |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12_ROOT_SIGNATURE_DESC` - 根签名描述符
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12_ROOT_SIGNATURE_DESC desc = D3D12RootSignature::CreateDesc(
|
||||
parameters.data(),
|
||||
parameters.size(),
|
||||
samplers.data(),
|
||||
samplers.size());
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
39
docs/api/rhi/d3d12/root-signature/create-descriptor-range.md
Normal file
39
docs/api/rhi/d3d12/root-signature/create-descriptor-range.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# D3D12RootSignature::CreateDescriptorRange
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
static D3D12_DESCRIPTOR_RANGE CreateDescriptorRange(D3D12_DESCRIPTOR_RANGE_TYPE type, uint32_t baseShaderRegister, uint32_t numDescriptors, uint32_t registerSpace = 0)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建描述符范围。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `type` | `D3D12_DESCRIPTOR_RANGE_TYPE` | 描述符范围类型 |
|
||||
| `baseShaderRegister` | `uint32_t` | 基础着色器寄存器 |
|
||||
| `numDescriptors` | `uint32_t` | 描述符数量 |
|
||||
| `registerSpace` | `uint32_t` | 寄存器空间(默认 0) |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12_DESCRIPTOR_RANGE` - 描述符范围
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12_DESCRIPTOR_RANGE range = D3D12RootSignature::CreateDescriptorRange(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, 0, 1);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
- [D3D12RootSignature::CreateDescriptorTable](create-descriptor-table.md) - 创建描述符表
|
||||
40
docs/api/rhi/d3d12/root-signature/create-descriptor-table.md
Normal file
40
docs/api/rhi/d3d12/root-signature/create-descriptor-table.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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) - 创建描述符范围
|
||||
38
docs/api/rhi/d3d12/root-signature/create-sampler-desc.md
Normal file
38
docs/api/rhi/d3d12/root-signature/create-sampler-desc.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# D3D12RootSignature::CreateSamplerDesc
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
static D3D12_SAMPLER_DESC CreateSamplerDesc(FilterMode filter, TextureAddressMode address, float maxLOD = D3D12_FLOAT32_MAX)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建采样器描述符。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `filter` | `FilterMode` | 过滤模式 |
|
||||
| `address` | `TextureAddressMode` | 寻址模式 |
|
||||
| `maxLOD` | `float` | 最大 LOD(默认无限) |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12_SAMPLER_DESC` - 采样器描述符
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12_SAMPLER_DESC desc = D3D12RootSignature::CreateSamplerDesc(FilterMode::Anisotropic, TextureAddressMode::Wrap);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
- [D3D12RootSignature::CreateStaticSampler](create-static-sampler.md) - 创建静态采样器
|
||||
39
docs/api/rhi/d3d12/root-signature/create-srv.md
Normal file
39
docs/api/rhi/d3d12/root-signature/create-srv.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# D3D12RootSignature::CreateSRV
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
static D3D12_ROOT_PARAMETER CreateSRV(uint32_t shaderRegister, ShaderVisibility visibility = ShaderVisibility::All, uint32_t registerSpace = 0)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建着色器资源视图(SRV)根参数。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `shaderRegister` | `uint32_t` | 着色器寄存器编号 |
|
||||
| `visibility` | `ShaderVisibility` | 可见性(默认 All) |
|
||||
| `registerSpace` | `uint32_t` | 寄存器空间(默认 0) |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12_ROOT_PARAMETER` - 根参数
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12_ROOT_PARAMETER srvParam = D3D12RootSignature::CreateSRV(0);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
- [D3D12RootSignature::CreateCBV](create-cbv.md) - 创建 CBV 根参数
|
||||
- [D3D12RootSignature::CreateUAV](create-uav.md) - 创建 UAV 根参数
|
||||
39
docs/api/rhi/d3d12/root-signature/create-static-sampler.md
Normal file
39
docs/api/rhi/d3d12/root-signature/create-static-sampler.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# D3D12RootSignature::CreateStaticSampler
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
static D3D12_STATIC_SAMPLER_DESC CreateStaticSampler(uint32_t shaderRegister, const D3D12_SAMPLER_DESC& desc, ShaderVisibility visibility = ShaderVisibility::Pixel)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建静态采样器描述符,静态采样器绑定到根签名中无需描述符堆。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `shaderRegister` | `uint32_t` | 着色器寄存器编号 |
|
||||
| `desc` | `D3D12_SAMPLER_DESC` | 采样器描述符 |
|
||||
| `visibility` | `ShaderVisibility` | 可见性(默认 Pixel) |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12_STATIC_SAMPLER_DESC` - 静态采样器描述符
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12_SAMPLER_DESC samplerDesc = D3D12RootSignature::CreateSamplerDesc(FilterMode::Anisotropic, TextureAddressMode::Wrap);
|
||||
D3D12_STATIC_SAMPLER_DESC staticSampler = D3D12RootSignature::CreateStaticSampler(0, samplerDesc);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
- [D3D12RootSignature::CreateSamplerDesc](create-sampler-desc.md) - 创建采样器描述符
|
||||
39
docs/api/rhi/d3d12/root-signature/create-uav.md
Normal file
39
docs/api/rhi/d3d12/root-signature/create-uav.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# D3D12RootSignature::CreateUAV
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
static D3D12_ROOT_PARAMETER CreateUAV(uint32_t shaderRegister, ShaderVisibility visibility = ShaderVisibility::All, uint32_t registerSpace = 0)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建无序访问视图(UAV)根参数。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `shaderRegister` | `uint32_t` | 着色器寄存器编号 |
|
||||
| `visibility` | `ShaderVisibility` | 可见性(默认 All) |
|
||||
| `registerSpace` | `uint32_t` | 寄存器空间(默认 0) |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12_ROOT_PARAMETER` - 根参数
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12_ROOT_PARAMETER uavParam = D3D12RootSignature::CreateUAV(0);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
- [D3D12RootSignature::CreateCBV](create-cbv.md) - 创建 CBV 根参数
|
||||
- [D3D12RootSignature::CreateSRV](create-srv.md) - 创建 SRV 根参数
|
||||
29
docs/api/rhi/d3d12/root-signature/get-parameter-count.md
Normal file
29
docs/api/rhi/d3d12/root-signature/get-parameter-count.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# D3D12RootSignature::GetParameterCount
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
uint32_t GetParameterCount() const
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
获取根签名中根参数的数量。
|
||||
|
||||
## 返回值
|
||||
|
||||
`uint32_t` - 根参数数量
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
uint32_t count = rootSignature->GetParameterCount();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
29
docs/api/rhi/d3d12/root-signature/get-root-signature.md
Normal file
29
docs/api/rhi/d3d12/root-signature/get-root-signature.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# D3D12RootSignature::GetRootSignature
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
ID3D12RootSignature* GetRootSignature() const
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
获取底层 `ID3D12RootSignature` 接口指针。
|
||||
|
||||
## 返回值
|
||||
|
||||
`ID3D12RootSignature*` - D3D12 根签名接口指针
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
ID3D12RootSignature* rs = rootSignature->GetRootSignature();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12RootSignature](root-signature.md) - 类总览
|
||||
28
docs/api/rhi/d3d12/root-signature/root-signature.md
Normal file
28
docs/api/rhi/d3d12/root-signature/root-signature.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# D3D12RootSignature
|
||||
|
||||
**命名空间**: `XCEngine::RHI`
|
||||
|
||||
**描述**: DirectX 12 根签名的 D3D12 实现。**不继承 RHI 抽象接口**,是 D3D12 特有的封装类。
|
||||
|
||||
## 公共方法
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| [`Initialize`](../../../threading/task-system/initialize.md) | 初始化根签名 |
|
||||
| [`Shutdown`](../../../threading/task-system/shutdown.md) | 关闭根签名 |
|
||||
| [`GetRootSignature`](get-root-signature.md) | 获取 D3D12 根签名 |
|
||||
| [`GetNativeHandle`](../../buffer/get-native-handle.md) | 获取原生句柄 |
|
||||
| [`GetParameterCount`](get-parameter-count.md) | 获取参数数量 |
|
||||
| [`CreateDesc`](create-desc.md) | 创建根签名描述符(静态) |
|
||||
| [`CreateCBV`](create-cbv.md) | 创建常量缓冲区视图(静态) |
|
||||
| [`CreateSRV`](create-srv.md) | 创建着色器资源视图(静态) |
|
||||
| [`CreateUAV`](create-uav.md) | 创建无序访问视图(静态) |
|
||||
| [`Create32BitConstants`](create-32bit-constants.md) | 创建 32 位常量(静态) |
|
||||
| [`CreateDescriptorTable`](create-descriptor-table.md) | 创建描述符表(静态) |
|
||||
| [`CreateStaticSampler`](create-static-sampler.md) | 创建静态采样器(静态) |
|
||||
| [`CreateSamplerDesc`](create-sampler-desc.md) | 创建采样器描述符(静态) |
|
||||
| [`CreateDescriptorRange`](create-descriptor-range.md) | 创建描述符范围(静态) |
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12 后端总览](../../opengl/overview.md)
|
||||
Reference in New Issue
Block a user