docs: 重构 API 文档结构并修正源码准确性
- 重组文档目录结构: 每个模块的概述页移动到模块子目录 - 重命名 index.md 为 main.md - 修正所有模块文档中的错误: - math: FromEuler→FromEulerAngles, TransformDirection 包含缩放, Box 是 OBB, Color::ToRGBA 格式 - containers: 新增 operator==/!= 文档, 补充 std::hash DJB 算法细节 - core: 修复 types 链接错误 - debug: LogLevelToString 返回大写, timestamp 是秒, Profiler 空实现标注, Windows API vs ANSI - memory: 修复头文件路径, malloc vs operator new, 新增方法文档 - resources: 修复 Shader/Texture 链接错误 - threading: TaskSystem::Wait 空实现标注, ReadWriteLock 重入描述, LambdaTask 链接 - 验证: fix_links.py 确认 0 个断裂引用
This commit is contained in:
17
docs/api/rhi/d3d12/command-list/alias-barrier.md
Normal file
17
docs/api/rhi/d3d12/command-list/alias-barrier.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::AliasBarrier
|
||||
|
||||
```cpp
|
||||
void AliasBarrier(void* beforeResource = nullptr, void* afterResource = nullptr);
|
||||
```
|
||||
|
||||
添加资源别名屏障。
|
||||
|
||||
**参数:**
|
||||
- `beforeResource` - 别名切换前的资源
|
||||
- `afterResource` - 别名切换后的资源
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/begin-query.md
Normal file
18
docs/api/rhi/d3d12/command-list/begin-query.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::BeginQuery
|
||||
|
||||
```cpp
|
||||
void BeginQuery(ID3D12QueryHeap* queryHeap, QueryType type, uint32_t index);
|
||||
```
|
||||
|
||||
开始查询。
|
||||
|
||||
**参数:**
|
||||
- `queryHeap` - 查询堆
|
||||
- `type` - 查询类型
|
||||
- `index` - 查询索引
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/clear-depth-stencil.md
Normal file
18
docs/api/rhi/d3d12/command-list/clear-depth-stencil.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::ClearDepthStencil
|
||||
|
||||
```cpp
|
||||
void ClearDepthStencil(void* depthStencil, float depth, uint8_t stencil) override;
|
||||
```
|
||||
|
||||
清除深度模板。
|
||||
|
||||
**参数:**
|
||||
- `depthStencil` - 深度模板指针
|
||||
- `depth` - 深度值
|
||||
- `stencil` - 模板值
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
17
docs/api/rhi/d3d12/command-list/clear-render-target.md
Normal file
17
docs/api/rhi/d3d12/command-list/clear-render-target.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::ClearRenderTarget
|
||||
|
||||
```cpp
|
||||
void ClearRenderTarget(void* renderTarget, const float color[4]) override;
|
||||
```
|
||||
|
||||
清除渲染目标。
|
||||
|
||||
**参数:**
|
||||
- `renderTarget` - 渲染目标指针
|
||||
- `color` - 清除颜色 [r, g, b, a]
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
143
docs/api/rhi/d3d12/command-list/command-list.md
Normal file
143
docs/api/rhi/d3d12/command-list/command-list.md
Normal file
@@ -0,0 +1,143 @@
|
||||
# D3D12CommandList
|
||||
|
||||
**命名空间**: `XCEngine::RHI`
|
||||
|
||||
**描述**: DirectX 12 命令列表的 D3D12 实现,继承自 `RHICommandList`。
|
||||
|
||||
## 方法列表
|
||||
|
||||
### 生命周期
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
|
||||
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
|
||||
| `Reset` | [详细文档](../../../resources/resourcehandle/reset.md) |
|
||||
| `Close` | [详细文档](../../../core/filewriter/close.md) |
|
||||
| `GetCommandList` | [详细文档](get-command-list.md) |
|
||||
|
||||
### 资源屏障
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `TransitionBarrier` | [详细文档](transition-barrier.md) |
|
||||
| `TransitionBarrierInternal` | [详细文档](transition-barrier-internal.md) |
|
||||
| `UAVBarrier` | [详细文档](uav-barrier.md) |
|
||||
| `AliasBarrier` | [详细文档](alias-barrier.md) |
|
||||
|
||||
### 管线状态
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `SetPipelineState` | [详细文档](set-pipeline-state.md) |
|
||||
| `SetRootSignature` | [详细文档](set-root-signature.md) |
|
||||
| `SetPrimitiveTopology` | [详细文档](set-primitive-topology.md) |
|
||||
|
||||
### 视口与裁剪
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `SetViewport` | [详细文档](set-viewport.md) |
|
||||
| `SetViewports` | [详细文档](set-viewports.md) |
|
||||
| `SetScissorRect` | [详细文档](set-scissor-rect.md) |
|
||||
| `SetScissorRects` | [详细文档](set-scissor-rects.md) |
|
||||
|
||||
### 渲染目标
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `SetRenderTargets` | [详细文档](set-render-targets.md) |
|
||||
| `SetRenderTargetsInternal` | [详细文档](set-render-targets-internal.md) |
|
||||
| `SetRenderTargetsHandle` | [详细文档](set-render-targets-handle.md) |
|
||||
|
||||
### 顶点/索引缓冲区
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `SetVertexBuffer` | [详细文档](set-vertex-buffer.md) |
|
||||
| `SetVertexBuffers` | [详细文档](set-vertex-buffers.md) |
|
||||
| `SetIndexBuffer` | [详细文档](set-index-buffer.md) |
|
||||
|
||||
### 描述符
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `SetDescriptorHeap` | [详细文档](set-descriptor-heap.md) |
|
||||
| `SetDescriptorHeaps` | [详细文档](set-descriptor-heaps.md) |
|
||||
| `SetGraphicsDescriptorTable` | [详细文档](set-graphics-descriptor-table.md) |
|
||||
| `SetComputeDescriptorTable` | [详细文档](set-compute-descriptor-table.md) |
|
||||
|
||||
### 根参数绑定
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `SetGraphicsRootConstantBufferView` | [详细文档](set-graphics-root-constant-buffer-view.md) |
|
||||
| `SetGraphicsRoot32BitConstants` | [详细文档](set-graphics-root-32bit-constants.md) |
|
||||
| `SetGraphicsRootDescriptorTable` | [详细文档](set-graphics-root-descriptor-table.md) |
|
||||
| `SetGraphicsRootShaderResourceView` | [详细文档](set-graphics-root-shader-resource-view.md) |
|
||||
|
||||
### 渲染状态
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `SetStencilRef` | [详细文档](set-stencil-ref.md) |
|
||||
| `SetBlendFactor` | [详细文档](set-blend-factor.md) |
|
||||
| `SetDepthBias` | [详细文档](set-depth-bias.md) |
|
||||
|
||||
### 绘制
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `Draw` | [详细文档](draw.md) |
|
||||
| `DrawIndexed` | [详细文档](draw-indexed.md) |
|
||||
| `DrawInstancedIndirect` | [详细文档](draw-instanced-indirect.md) |
|
||||
| `DrawIndexedInstancedIndirect` | [详细文档](draw-indexed-instanced-indirect.md) |
|
||||
|
||||
### 清除
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `Clear` | [详细文档](../../../memory/linear-allocator/clear.md) |
|
||||
| `ClearRenderTarget` | [详细文档](clear-render-target.md) |
|
||||
| `ClearDepthStencil` | [详细文档](clear-depth-stencil.md) |
|
||||
|
||||
### 复制
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `CopyResource` | [详细文档](copy-resource.md) |
|
||||
| `CopyBuffer` | [详细文档](copy-buffer.md) |
|
||||
| `CopyTexture` | [详细文档](copy-texture.md) |
|
||||
|
||||
### 查询
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `BeginQuery` | [详细文档](begin-query.md) |
|
||||
| `EndQuery` | [详细文档](end-query.md) |
|
||||
| `ResolveQueryData` | [详细文档](resolve-query-data.md) |
|
||||
|
||||
### 计算
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `Dispatch` | [详细文档](dispatch.md) |
|
||||
| `DispatchIndirect` | [详细文档](dispatch-indirect.md) |
|
||||
|
||||
### Bundle
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `ExecuteBundle` | [详细文档](execute-bundle.md) |
|
||||
|
||||
### 状态管理
|
||||
|
||||
| 方法 | 文档 |
|
||||
|------|------|
|
||||
| `GetResourceState` | [详细文档](get-resource-state.md) |
|
||||
| `TrackResource` | [详细文档](track-resource.md) |
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12 后端总览](../overview.md)
|
||||
- [RHICommandList](../../command-list/command-list.md) - 抽象命令列表接口
|
||||
20
docs/api/rhi/d3d12/command-list/copy-buffer.md
Normal file
20
docs/api/rhi/d3d12/command-list/copy-buffer.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# D3D12CommandList::CopyBuffer
|
||||
|
||||
```cpp
|
||||
void CopyBuffer(ID3D12Resource* dst, uint64_t dstOffset, ID3D12Resource* src, uint64_t srcOffset, uint64_t size);
|
||||
```
|
||||
|
||||
复制缓冲区。
|
||||
|
||||
**参数:**
|
||||
- `dst` - 目标缓冲区
|
||||
- `dstOffset` - 目标偏移
|
||||
- `src` - 源缓冲区
|
||||
- `srcOffset` - 源偏移
|
||||
- `size` - 复制大小
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
17
docs/api/rhi/d3d12/command-list/copy-resource.md
Normal file
17
docs/api/rhi/d3d12/command-list/copy-resource.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::CopyResource
|
||||
|
||||
```cpp
|
||||
void CopyResource(void* dst, void* src) override;
|
||||
```
|
||||
|
||||
复制资源。
|
||||
|
||||
**参数:**
|
||||
- `dst` - 目标资源指针
|
||||
- `src` - 源资源指针
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
19
docs/api/rhi/d3d12/command-list/copy-texture.md
Normal file
19
docs/api/rhi/d3d12/command-list/copy-texture.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# D3D12CommandList::CopyTexture
|
||||
|
||||
```cpp
|
||||
void CopyTexture(ID3D12Resource* dst, const D3D12_TEXTURE_COPY_LOCATION& dstLocation, ID3D12Resource* src, const D3D12_TEXTURE_COPY_LOCATION& srcLocation);
|
||||
```
|
||||
|
||||
复制纹理。
|
||||
|
||||
**参数:**
|
||||
- `dst` - 目标纹理
|
||||
- `dstLocation` - 目标位置
|
||||
- `src` - 源纹理
|
||||
- `srcLocation` - 源位置
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
17
docs/api/rhi/d3d12/command-list/dispatch-indirect.md
Normal file
17
docs/api/rhi/d3d12/command-list/dispatch-indirect.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::DispatchIndirect
|
||||
|
||||
```cpp
|
||||
void DispatchIndirect(void* argBuffer, uint64_t alignedByteOffset);
|
||||
```
|
||||
|
||||
间接分发计算命令。
|
||||
|
||||
**参数:**
|
||||
- `argBuffer` - 参数缓冲区
|
||||
- `alignedByteOffset` - 字节偏移
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/dispatch.md
Normal file
18
docs/api/rhi/d3d12/command-list/dispatch.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::Dispatch
|
||||
|
||||
```cpp
|
||||
void Dispatch(uint32_t x, uint32_t y, uint32_t z) override;
|
||||
```
|
||||
|
||||
分发计算命令。
|
||||
|
||||
**参数:**
|
||||
- `x` - X 维度线程组数量
|
||||
- `y` - Y 维度线程组数量
|
||||
- `z` - Z 维度线程组数量
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::DrawIndexedInstancedIndirect
|
||||
|
||||
```cpp
|
||||
void DrawIndexedInstancedIndirect(void* argBuffer, uint64_t alignedByteOffset);
|
||||
```
|
||||
|
||||
间接绘制索引实例。
|
||||
|
||||
**参数:**
|
||||
- `argBuffer` - 参数缓冲区
|
||||
- `alignedByteOffset` - 字节偏移
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
20
docs/api/rhi/d3d12/command-list/draw-indexed.md
Normal file
20
docs/api/rhi/d3d12/command-list/draw-indexed.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# D3D12CommandList::DrawIndexed
|
||||
|
||||
```cpp
|
||||
void DrawIndexed(uint32_t indexCount, uint32_t instanceCount = 1, uint32_t startIndex = 0, int32_t baseVertex = 0, uint32_t startInstance = 0) override;
|
||||
```
|
||||
|
||||
绘制索引调用。
|
||||
|
||||
**参数:**
|
||||
- `indexCount` - 索引数量
|
||||
- `instanceCount` - 实例数量
|
||||
- `startIndex` - 起始索引
|
||||
- `baseVertex` - 基础顶点偏移
|
||||
- `startInstance` - 起始实例索引
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
17
docs/api/rhi/d3d12/command-list/draw-instanced-indirect.md
Normal file
17
docs/api/rhi/d3d12/command-list/draw-instanced-indirect.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::DrawInstancedIndirect
|
||||
|
||||
```cpp
|
||||
void DrawInstancedIndirect(void* argBuffer, uint64_t alignedByteOffset);
|
||||
```
|
||||
|
||||
间接绘制实例。
|
||||
|
||||
**参数:**
|
||||
- `argBuffer` - 参数缓冲区
|
||||
- `alignedByteOffset` - 字节偏移
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
19
docs/api/rhi/d3d12/command-list/draw.md
Normal file
19
docs/api/rhi/d3d12/command-list/draw.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# D3D12CommandList::Draw
|
||||
|
||||
```cpp
|
||||
void Draw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t startVertex = 0, uint32_t startInstance = 0) override;
|
||||
```
|
||||
|
||||
绘制调用。
|
||||
|
||||
**参数:**
|
||||
- `vertexCount` - 顶点数量
|
||||
- `instanceCount` - 实例数量
|
||||
- `startVertex` - 起始顶点索引
|
||||
- `startInstance` - 起始实例索引
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/end-query.md
Normal file
18
docs/api/rhi/d3d12/command-list/end-query.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::EndQuery
|
||||
|
||||
```cpp
|
||||
void EndQuery(ID3D12QueryHeap* queryHeap, QueryType type, uint32_t index);
|
||||
```
|
||||
|
||||
结束查询。
|
||||
|
||||
**参数:**
|
||||
- `queryHeap` - 查询堆
|
||||
- `type` - 查询类型
|
||||
- `index` - 查询索引
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/execute-bundle.md
Normal file
16
docs/api/rhi/d3d12/command-list/execute-bundle.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::ExecuteBundle
|
||||
|
||||
```cpp
|
||||
void ExecuteBundle(ID3D12GraphicsCommandList* bundle);
|
||||
```
|
||||
|
||||
执行 Bundle。
|
||||
|
||||
**参数:**
|
||||
- `bundle` - Bundle 命令列表
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
15
docs/api/rhi/d3d12/command-list/get-command-list.md
Normal file
15
docs/api/rhi/d3d12/command-list/get-command-list.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# D3D12CommandList::GetCommandList
|
||||
|
||||
```cpp
|
||||
ID3D12GraphicsCommandList* GetCommandList() const { return m_commandList.Get(); }
|
||||
```
|
||||
|
||||
获取底层的 D3D12 图形命令列表接口。
|
||||
|
||||
**返回:** `ID3D12GraphicsCommandList*`
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/get-resource-state.md
Normal file
18
docs/api/rhi/d3d12/command-list/get-resource-state.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::GetResourceState
|
||||
|
||||
```cpp
|
||||
ResourceStates GetResourceState(ID3D12Resource* resource) const;
|
||||
```
|
||||
|
||||
获取资源状态。
|
||||
|
||||
**参数:**
|
||||
- `resource` - D3D12 资源指针
|
||||
|
||||
**返回:** 资源当前状态
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
21
docs/api/rhi/d3d12/command-list/resolve-query-data.md
Normal file
21
docs/api/rhi/d3d12/command-list/resolve-query-data.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# D3D12CommandList::ResolveQueryData
|
||||
|
||||
```cpp
|
||||
void ResolveQueryData(ID3D12QueryHeap* queryHeap, QueryType type, uint32_t startIndex, uint32_t count, ID3D12Resource* resultBuffer, uint64_t resultOffset);
|
||||
```
|
||||
|
||||
解析查询数据。
|
||||
|
||||
**参数:**
|
||||
- `queryHeap` - 查询堆
|
||||
- `type` - 查询类型
|
||||
- `startIndex` - 起始索引
|
||||
- `count` - 查询数量
|
||||
- `resultBuffer` - 结果缓冲区
|
||||
- `resultOffset` - 结果偏移
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/set-blend-factor.md
Normal file
16
docs/api/rhi/d3d12/command-list/set-blend-factor.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::SetBlendFactor
|
||||
|
||||
```cpp
|
||||
void SetBlendFactor(const float blendFactor[4]);
|
||||
```
|
||||
|
||||
设置混合因子。
|
||||
|
||||
**参数:**
|
||||
- `blendFactor` - 混合因子数组 [r, g, b, a]
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::SetComputeDescriptorTable
|
||||
|
||||
```cpp
|
||||
void SetComputeDescriptorTable(uint32_t rootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE baseHandle);
|
||||
```
|
||||
|
||||
设置计算描述符表。
|
||||
|
||||
**参数:**
|
||||
- `rootParameterIndex` - 根参数索引
|
||||
- `baseHandle` - GPU 描述符句柄
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/set-depth-bias.md
Normal file
18
docs/api/rhi/d3d12/command-list/set-depth-bias.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::SetDepthBias
|
||||
|
||||
```cpp
|
||||
void SetDepthBias(float depthBias, float slopeScaledDepthBias, float depthBiasClamp);
|
||||
```
|
||||
|
||||
设置深度偏移。
|
||||
|
||||
**参数:**
|
||||
- `depthBias` - 基础深度偏移
|
||||
- `slopeScaledDepthBias` - 斜率缩放深度偏移
|
||||
- `depthBiasClamp` - 深度偏移上限
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/set-descriptor-heap.md
Normal file
16
docs/api/rhi/d3d12/command-list/set-descriptor-heap.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::SetDescriptorHeap
|
||||
|
||||
```cpp
|
||||
void SetDescriptorHeap(ID3D12DescriptorHeap* heap);
|
||||
```
|
||||
|
||||
设置描述符堆。
|
||||
|
||||
**参数:**
|
||||
- `heap` - D3D12 描述符堆指针
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
17
docs/api/rhi/d3d12/command-list/set-descriptor-heaps.md
Normal file
17
docs/api/rhi/d3d12/command-list/set-descriptor-heaps.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::SetDescriptorHeaps
|
||||
|
||||
```cpp
|
||||
void SetDescriptorHeaps(uint32_t count, ID3D12DescriptorHeap** heaps);
|
||||
```
|
||||
|
||||
设置多个描述符堆。
|
||||
|
||||
**参数:**
|
||||
- `count` - 描述符堆数量
|
||||
- `heaps` - 描述符堆指针数组
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::SetGraphicsDescriptorTable
|
||||
|
||||
```cpp
|
||||
void SetGraphicsDescriptorTable(uint32_t rootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE baseHandle);
|
||||
```
|
||||
|
||||
设置图形描述符表。
|
||||
|
||||
**参数:**
|
||||
- `rootParameterIndex` - 根参数索引
|
||||
- `baseHandle` - GPU 描述符句柄
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,19 @@
|
||||
# D3D12CommandList::SetGraphicsRoot32BitConstants
|
||||
|
||||
```cpp
|
||||
void SetGraphicsRoot32BitConstants(uint32_t rootParameterIndex, uint32_t num32BitValuesToSet, const void* pSrcData, uint32_t destOffsetIn32BitValues);
|
||||
```
|
||||
|
||||
设置图形根 32 位常量。
|
||||
|
||||
**参数:**
|
||||
- `rootParameterIndex` - 根参数索引
|
||||
- `num32BitValuesToSet` - 要设置的 32 位值数量
|
||||
- `pSrcData` - 源数据指针
|
||||
- `destOffsetIn32BitValues` - 目标偏移量
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::SetGraphicsRootConstantBufferView
|
||||
|
||||
```cpp
|
||||
void SetGraphicsRootConstantBufferView(uint32_t rootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS bufferLocation);
|
||||
```
|
||||
|
||||
设置图形根常量缓冲区视图。
|
||||
|
||||
**参数:**
|
||||
- `rootParameterIndex` - 根参数索引
|
||||
- `bufferLocation` - GPU 虚拟地址
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::SetGraphicsRootDescriptorTable
|
||||
|
||||
```cpp
|
||||
void SetGraphicsRootDescriptorTable(uint32_t rootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE baseDescriptor);
|
||||
```
|
||||
|
||||
设置图形根描述符表。
|
||||
|
||||
**参数:**
|
||||
- `rootParameterIndex` - 根参数索引
|
||||
- `baseDescriptor` - GPU 描述符句柄
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::SetGraphicsRootShaderResourceView
|
||||
|
||||
```cpp
|
||||
void SetGraphicsRootShaderResourceView(uint32_t rootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS shaderResource);
|
||||
```
|
||||
|
||||
设置图形根着色器资源视图。
|
||||
|
||||
**参数:**
|
||||
- `rootParameterIndex` - 根参数索引
|
||||
- `shaderResource` - GPU 虚拟地址
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/set-index-buffer.md
Normal file
18
docs/api/rhi/d3d12/command-list/set-index-buffer.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::SetIndexBuffer
|
||||
|
||||
```cpp
|
||||
void SetIndexBuffer(void* buffer, uint64_t offset, Format format) override;
|
||||
```
|
||||
|
||||
设置索引缓冲区。
|
||||
|
||||
**参数:**
|
||||
- `buffer` - 缓冲区指针
|
||||
- `offset` - 缓冲区偏移
|
||||
- `format` - 索引格式
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/set-pipeline-state.md
Normal file
16
docs/api/rhi/d3d12/command-list/set-pipeline-state.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::SetPipelineState
|
||||
|
||||
```cpp
|
||||
void SetPipelineState(void* pso) override;
|
||||
```
|
||||
|
||||
设置图形管线状态对象。
|
||||
|
||||
**参数:**
|
||||
- `pso` - 管线状态对象指针
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/set-primitive-topology.md
Normal file
16
docs/api/rhi/d3d12/command-list/set-primitive-topology.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::SetPrimitiveTopology
|
||||
|
||||
```cpp
|
||||
void SetPrimitiveTopology(PrimitiveTopology topology);
|
||||
```
|
||||
|
||||
设置图元拓扑类型。
|
||||
|
||||
**参数:**
|
||||
- `topology` - 图元拓扑类型
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/set-render-targets-handle.md
Normal file
18
docs/api/rhi/d3d12/command-list/set-render-targets-handle.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::SetRenderTargetsHandle
|
||||
|
||||
```cpp
|
||||
void SetRenderTargetsHandle(uint32_t count, const D3D12_CPU_DESCRIPTOR_HANDLE* renderTargetHandles, const D3D12_CPU_DESCRIPTOR_HANDLE* depthStencilHandle = nullptr);
|
||||
```
|
||||
|
||||
使用描述符句柄设置渲染目标。
|
||||
|
||||
**参数:**
|
||||
- `count` - 渲染目标数量
|
||||
- `renderTargetHandles` - 渲染目标描述符句柄数组
|
||||
- `depthStencilHandle` - 深度模板描述符句柄
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::SetRenderTargetsInternal
|
||||
|
||||
```cpp
|
||||
void SetRenderTargetsInternal(uint32_t count, ID3D12Resource** renderTargets, ID3D12Resource* depthStencil = nullptr);
|
||||
```
|
||||
|
||||
设置渲染目标(内部接口)。
|
||||
|
||||
**参数:**
|
||||
- `count` - 渲染目标数量
|
||||
- `renderTargets` - D3D12 资源指针数组
|
||||
- `depthStencil` - 深度模板资源指针
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/set-render-targets.md
Normal file
18
docs/api/rhi/d3d12/command-list/set-render-targets.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::SetRenderTargets
|
||||
|
||||
```cpp
|
||||
void SetRenderTargets(uint32_t count, void** renderTargets, void* depthStencil = nullptr) override;
|
||||
```
|
||||
|
||||
设置渲染目标。
|
||||
|
||||
**参数:**
|
||||
- `count` - 渲染目标数量
|
||||
- `renderTargets` - 渲染目标指针数组
|
||||
- `depthStencil` - 深度模板目标指针
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/set-root-signature.md
Normal file
16
docs/api/rhi/d3d12/command-list/set-root-signature.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::SetRootSignature
|
||||
|
||||
```cpp
|
||||
void SetRootSignature(ID3D12RootSignature* signature);
|
||||
```
|
||||
|
||||
设置根签名。
|
||||
|
||||
**参数:**
|
||||
- `signature` - D3D12 根签名指针
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/set-scissor-rect.md
Normal file
16
docs/api/rhi/d3d12/command-list/set-scissor-rect.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::SetScissorRect
|
||||
|
||||
```cpp
|
||||
void SetScissorRect(const Rect& rect) override;
|
||||
```
|
||||
|
||||
设置裁剪矩形。
|
||||
|
||||
**参数:**
|
||||
- `rect` - 裁剪矩形结构
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
17
docs/api/rhi/d3d12/command-list/set-scissor-rects.md
Normal file
17
docs/api/rhi/d3d12/command-list/set-scissor-rects.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::SetScissorRects
|
||||
|
||||
```cpp
|
||||
void SetScissorRects(uint32_t count, const Rect* rects) override;
|
||||
```
|
||||
|
||||
设置多个裁剪矩形。
|
||||
|
||||
**参数:**
|
||||
- `count` - 裁剪矩形数量
|
||||
- `rects` - 裁剪矩形数组
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/set-stencil-ref.md
Normal file
16
docs/api/rhi/d3d12/command-list/set-stencil-ref.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::SetStencilRef
|
||||
|
||||
```cpp
|
||||
void SetStencilRef(uint32_t stencilRef);
|
||||
```
|
||||
|
||||
设置模板参考值。
|
||||
|
||||
**参数:**
|
||||
- `stencilRef` - 模板参考值
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
19
docs/api/rhi/d3d12/command-list/set-vertex-buffer.md
Normal file
19
docs/api/rhi/d3d12/command-list/set-vertex-buffer.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# D3D12CommandList::SetVertexBuffer
|
||||
|
||||
```cpp
|
||||
void SetVertexBuffer(uint32_t slot, void* buffer, uint64_t offset, uint32_t stride) override;
|
||||
```
|
||||
|
||||
设置单个顶点缓冲区。
|
||||
|
||||
**参数:**
|
||||
- `slot` - 顶点缓冲区槽位
|
||||
- `buffer` - 缓冲区指针
|
||||
- `offset` - 缓冲区偏移
|
||||
- `stride` - 顶点 stride
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
20
docs/api/rhi/d3d12/command-list/set-vertex-buffers.md
Normal file
20
docs/api/rhi/d3d12/command-list/set-vertex-buffers.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# D3D12CommandList::SetVertexBuffers
|
||||
|
||||
```cpp
|
||||
void SetVertexBuffers(uint32_t startSlot, uint32_t count, const uint64_t* buffers, const uint64_t* offsets, const uint32_t* strides) override;
|
||||
```
|
||||
|
||||
设置多个顶点缓冲区。
|
||||
|
||||
**参数:**
|
||||
- `startSlot` - 起始槽位
|
||||
- `count` - 缓冲区数量
|
||||
- `buffers` - 缓冲区指针数组
|
||||
- `offsets` - 偏移数组
|
||||
- `strides` - stride 数组
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/set-viewport.md
Normal file
16
docs/api/rhi/d3d12/command-list/set-viewport.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::SetViewport
|
||||
|
||||
```cpp
|
||||
void SetViewport(const Viewport& viewport) override;
|
||||
```
|
||||
|
||||
设置视口。
|
||||
|
||||
**参数:**
|
||||
- `viewport` - 视口结构
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
17
docs/api/rhi/d3d12/command-list/set-viewports.md
Normal file
17
docs/api/rhi/d3d12/command-list/set-viewports.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# D3D12CommandList::SetViewports
|
||||
|
||||
```cpp
|
||||
void SetViewports(uint32_t count, const Viewport* viewports) override;
|
||||
```
|
||||
|
||||
设置多个视口。
|
||||
|
||||
**参数:**
|
||||
- `count` - 视口数量
|
||||
- `viewports` - 视口数组
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/track-resource.md
Normal file
16
docs/api/rhi/d3d12/command-list/track-resource.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::TrackResource
|
||||
|
||||
```cpp
|
||||
void TrackResource(ID3D12Resource* resource);
|
||||
```
|
||||
|
||||
跟踪资源状态。
|
||||
|
||||
**参数:**
|
||||
- `resource` - D3D12 资源指针
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
@@ -0,0 +1,19 @@
|
||||
# D3D12CommandList::TransitionBarrierInternal
|
||||
|
||||
```cpp
|
||||
void TransitionBarrierInternal(ID3D12Resource* resource, ResourceStates stateBefore, ResourceStates stateAfter, uint32_t subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES);
|
||||
```
|
||||
|
||||
为资源添加转换屏障(内部接口)。
|
||||
|
||||
**参数:**
|
||||
- `resource` - D3D12 资源指针
|
||||
- `stateBefore` - 转换前的资源状态
|
||||
- `stateAfter` - 转换后的资源状态
|
||||
- `subresource` - 子资源索引,默认为所有子资源
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
18
docs/api/rhi/d3d12/command-list/transition-barrier.md
Normal file
18
docs/api/rhi/d3d12/command-list/transition-barrier.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# D3D12CommandList::TransitionBarrier
|
||||
|
||||
```cpp
|
||||
void TransitionBarrier(void* resource, ResourceStates stateBefore, ResourceStates stateAfter) override;
|
||||
```
|
||||
|
||||
为资源添加转换屏障。
|
||||
|
||||
**参数:**
|
||||
- `resource` - 目标资源指针
|
||||
- `stateBefore` - 转换前的资源状态
|
||||
- `stateAfter` - 转换后的资源状态
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
16
docs/api/rhi/d3d12/command-list/uav-barrier.md
Normal file
16
docs/api/rhi/d3d12/command-list/uav-barrier.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# D3D12CommandList::UAVBarrier
|
||||
|
||||
```cpp
|
||||
void UAVBarrier(void* resource = nullptr);
|
||||
```
|
||||
|
||||
添加无序访问视图屏障。
|
||||
|
||||
**参数:**
|
||||
- `resource` - 目标资源指针,nullptr 表示所有 UAV
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
Reference in New Issue
Block a user