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:
25
docs/api/rhi/d3d12/device/check-feature-support.md
Normal file
25
docs/api/rhi/d3d12/device/check-feature-support.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# D3D12Device::CheckFeatureSupport
|
||||
|
||||
```cpp
|
||||
bool CheckFeatureSupport(D3D12_FEATURE feature, void* featureSupportData, uint32_t featureSupportDataSize)
|
||||
```
|
||||
|
||||
检查特性支持。
|
||||
|
||||
**参数:**
|
||||
- `feature` - 特性类型
|
||||
- `featureSupportData` - 特性支持数据缓冲区
|
||||
- `featureSupportDataSize` - 数据大小
|
||||
|
||||
**返回:** 是否支持该特性
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
D3D12_FEATURE_DATA_D3D12_OPTIONS options;
|
||||
bool supported = d3d12Device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &options, sizeof(options));
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Device 总览](device.md) - 返回类总览
|
||||
35
docs/api/rhi/d3d12/device/device.md
Normal file
35
docs/api/rhi/d3d12/device/device.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# D3D12Device
|
||||
|
||||
**命名空间**: `XCEngine::RHI`
|
||||
|
||||
**描述**: DirectX 12 设备实现,继承自 `RHIDevice`。
|
||||
|
||||
## 公共方法
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| [`Initialize`](../../../threading/task-system/initialize.md) | 初始化设备 |
|
||||
| [`Shutdown`](../../../threading/task-system/shutdown.md) | 关闭设备 |
|
||||
| [`CreateBuffer`](../../device/create-buffer.md) | 创建缓冲区 |
|
||||
| [`CreateTexture`](../../device/create-texture.md) | 创建纹理 |
|
||||
| [`CreateSwapChain`](../../device/create-swap-chain.md) | 创建交换链 |
|
||||
| [`CreateCommandList`](../../device/create-command-list.md) | 创建命令列表 |
|
||||
| [`CreateCommandQueue`](../../device/create-command-queue.md) | 创建命令队列 |
|
||||
| [`CompileShader`](../../device/compile-shader.md) | 编译着色器 |
|
||||
| [`CreatePipelineState`](../../device/create-pipeline-state.md) | 创建管线状态 |
|
||||
| [`CreateFence`](../../device/create-fence.md) | 创建栅栏 |
|
||||
| [`CreateSampler`](../../device/create-sampler.md) | 创建采样器 |
|
||||
| [`GetCapabilities`](../../device/get-capabilities.md) | 获取设备能力 |
|
||||
| [`GetDeviceInfo`](../../device/get-device-info.md) | 获取设备信息 |
|
||||
| [`GetNativeDevice`](../../device/get-native-device.md) | 获取原生设备 |
|
||||
| [`GetDevice`](get-device.md) | 获取 D3D12 设备 |
|
||||
| [`GetFactory`](get-factory.md) | 获取 D3D12 工厂 |
|
||||
| [`GetAdapterInfo`](get-adapter-info.md) | 获取适配器信息 |
|
||||
| [`EnumerateAdapters`](enumerate-adapters.md) | 枚举适配器 |
|
||||
| [`GetDescriptorHandleIncrementSize`](get-descriptor-handle-increment-size.md) | 获取描述符增量大小 |
|
||||
| [`CheckFeatureSupport`](check-feature-support.md) | 检查特性支持 |
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12 后端总览](../../opengl/overview.md)
|
||||
- [RHIDevice](../../device/device.md) - 抽象设备接口
|
||||
22
docs/api/rhi/d3d12/device/enumerate-adapters.md
Normal file
22
docs/api/rhi/d3d12/device/enumerate-adapters.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# D3D12Device::EnumerateAdapters
|
||||
|
||||
```cpp
|
||||
std::vector<AdapterInfo> EnumerateAdapters()
|
||||
```
|
||||
|
||||
枚举所有可用的图形适配器。
|
||||
|
||||
**返回:** 适配器信息列表
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
std::vector<AdapterInfo> adapters = d3d12Device->EnumerateAdapters();
|
||||
for (const auto& adapter : adapters) {
|
||||
wprintf(L"Adapter: %ls\n", adapter.description.c_str());
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Device 总览](device.md) - 返回类总览
|
||||
20
docs/api/rhi/d3d12/device/get-adapter-info.md
Normal file
20
docs/api/rhi/d3d12/device/get-adapter-info.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# D3D12Device::GetAdapterInfo
|
||||
|
||||
```cpp
|
||||
const AdapterInfo& GetAdapterInfo() const
|
||||
```
|
||||
|
||||
获取适配器信息。
|
||||
|
||||
**返回:** 适配器信息结构体引用
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
const AdapterInfo& info = d3d12Device->GetAdapterInfo();
|
||||
wprintf(L"GPU: %ls\n", info.description.c_str());
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Device 总览](device.md) - 返回类总览
|
||||
@@ -0,0 +1,22 @@
|
||||
# D3D12Device::GetDescriptorHandleIncrementSize
|
||||
|
||||
```cpp
|
||||
UINT GetDescriptorHandleIncrementSize(DescriptorHeapType type) const
|
||||
```
|
||||
|
||||
获取描述符句柄增量大小。
|
||||
|
||||
**参数:**
|
||||
- `type` - 描述符堆类型
|
||||
|
||||
**返回:** 描述符句柄增量大小(字节)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
UINT size = d3d12Device->GetDescriptorHandleIncrementSize(DescriptorHeapType::CBV_SRV_UAV);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Device 总览](device.md) - 返回类总览
|
||||
19
docs/api/rhi/d3d12/device/get-device.md
Normal file
19
docs/api/rhi/d3d12/device/get-device.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# D3D12Device::GetDevice
|
||||
|
||||
```cpp
|
||||
ID3D12Device* GetDevice() const
|
||||
```
|
||||
|
||||
获取底层 D3D12 设备指针。
|
||||
|
||||
**返回:** DirectX 12 设备指针
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
ID3D12Device* device = d3d12Device->GetDevice();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Device 总览](device.md) - 返回类总览
|
||||
19
docs/api/rhi/d3d12/device/get-factory.md
Normal file
19
docs/api/rhi/d3d12/device/get-factory.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# D3D12Device::GetFactory
|
||||
|
||||
```cpp
|
||||
IDXGIFactory4* GetFactory() const
|
||||
```
|
||||
|
||||
获取底层 DXGI 工厂指针。
|
||||
|
||||
**返回:** DXGI 工厂指针
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
IDXGIFactory4* factory = d3d12Device->GetFactory();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Device 总览](device.md) - 返回类总览
|
||||
165
docs/api/rhi/d3d12/device/methods.md
Normal file
165
docs/api/rhi/d3d12/device/methods.md
Normal file
@@ -0,0 +1,165 @@
|
||||
# D3D12Device 方法
|
||||
|
||||
## 继承方法
|
||||
|
||||
### Initialize
|
||||
|
||||
```cpp
|
||||
bool Initialize(const RHIDeviceDesc& desc) override;
|
||||
```
|
||||
|
||||
初始化 D3D12 设备。
|
||||
|
||||
### Shutdown
|
||||
|
||||
```cpp
|
||||
void Shutdown() override;
|
||||
```
|
||||
|
||||
关闭设备。
|
||||
|
||||
### CreateBuffer
|
||||
|
||||
```cpp
|
||||
RHIBuffer* CreateBuffer(const BufferDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 缓冲区。
|
||||
|
||||
### CreateTexture
|
||||
|
||||
```cpp
|
||||
RHITexture* CreateTexture(const TextureDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 纹理。
|
||||
|
||||
### CreateSwapChain
|
||||
|
||||
```cpp
|
||||
RHISwapChain* CreateSwapChain(const SwapChainDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 交换链。
|
||||
|
||||
### CreateCommandList
|
||||
|
||||
```cpp
|
||||
RHICommandList* CreateCommandList(const CommandListDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 命令列表。
|
||||
|
||||
### CreateCommandQueue
|
||||
|
||||
```cpp
|
||||
RHICommandQueue* CreateCommandQueue(const CommandQueueDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 命令队列。
|
||||
|
||||
### CompileShader
|
||||
|
||||
```cpp
|
||||
RHIShader* CompileShader(const ShaderCompileDesc& desc) override;
|
||||
```
|
||||
|
||||
编译 D3D12 着色器。
|
||||
|
||||
### CreatePipelineState
|
||||
|
||||
```cpp
|
||||
RHIPipelineState* CreatePipelineState(const PipelineStateDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 管线状态对象。
|
||||
|
||||
### CreateFence
|
||||
|
||||
```cpp
|
||||
RHIFence* CreateFence(const FenceDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 栅栏。
|
||||
|
||||
### CreateSampler
|
||||
|
||||
```cpp
|
||||
RHISampler* CreateSampler(const SamplerDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 采样器。
|
||||
|
||||
### GetCapabilities
|
||||
|
||||
```cpp
|
||||
const RHICapabilities& GetCapabilities() const override;
|
||||
```
|
||||
|
||||
获取设备能力。
|
||||
|
||||
### GetDeviceInfo
|
||||
|
||||
```cpp
|
||||
const RHIDeviceInfo& GetDeviceInfo() const override;
|
||||
```
|
||||
|
||||
获取设备信息。
|
||||
|
||||
### GetNativeDevice
|
||||
|
||||
```cpp
|
||||
void* GetNativeDevice() override;
|
||||
```
|
||||
|
||||
获取原生 D3D12 设备指针。
|
||||
|
||||
## D3D12 特有方法
|
||||
|
||||
### GetDevice
|
||||
|
||||
```cpp
|
||||
ID3D12Device* GetDevice() const;
|
||||
```
|
||||
|
||||
获取 `ID3D12Device` 接口。
|
||||
|
||||
### GetFactory
|
||||
|
||||
```cpp
|
||||
IDXGIFactory4* GetFactory() const;
|
||||
```
|
||||
|
||||
获取 `IDXGIFactory4` 接口。
|
||||
|
||||
### GetAdapterInfo
|
||||
|
||||
```cpp
|
||||
const AdapterInfo& GetAdapterInfo() const;
|
||||
```
|
||||
|
||||
获取适配器信息。
|
||||
|
||||
### EnumerateAdapters
|
||||
|
||||
```cpp
|
||||
std::vector<AdapterInfo> EnumerateAdapters();
|
||||
```
|
||||
|
||||
枚举所有适配器。
|
||||
|
||||
### GetDescriptorHandleIncrementSize
|
||||
|
||||
```cpp
|
||||
UINT GetDescriptorHandleIncrementSize(DescriptorHeapType type) const;
|
||||
```
|
||||
|
||||
获取描述符句柄增量大小。
|
||||
|
||||
### CheckFeatureSupport
|
||||
|
||||
```cpp
|
||||
bool CheckFeatureSupport(D3D12_FEATURE feature, void* featureSupportData, uint32_t featureSupportDataSize);
|
||||
```
|
||||
|
||||
检查功能支持。
|
||||
Reference in New Issue
Block a user