docs: Update RHI_Design_Issues.md - mark Priority 1 DescriptorSet as completed
This commit is contained in:
@@ -64,6 +64,48 @@ virtual void SetComputeDescriptorSets(
|
||||
|
||||
---
|
||||
|
||||
### 3.1.1 ✅ 已完成:DescriptorSet 抽象
|
||||
|
||||
**实现状态**:2026-03-25 已完成
|
||||
|
||||
**新增抽象**:
|
||||
| 类名 | 说明 |
|
||||
|------|------|
|
||||
| `RHIDescriptorSet` | DescriptorSet 基类,含 Update/UpdateSampler/GetNativeHandle/GetBindingCount/GetBindings |
|
||||
| `RHIDescriptorPool` | DescriptorPool 基类,含 AllocateSet/FreeSet |
|
||||
| `D3D12DescriptorSet` | D3D12 实现,使用 DescriptorHeap 分配 |
|
||||
| `D3D12DescriptorHeap` | 扩展支持 AllocateSet/FreeSet |
|
||||
| `OpenGLDescriptorSet` | OpenGL 实现,使用 TextureUnitAllocator |
|
||||
| `OpenGLDescriptorPool` | OpenGL 实现 |
|
||||
|
||||
**RHICommandList 新增接口**:
|
||||
```cpp
|
||||
virtual void SetGraphicsDescriptorSets(
|
||||
uint32_t firstSet,
|
||||
uint32_t count,
|
||||
RHIDescriptorSet** descriptorSets,
|
||||
RHIPipelineLayout* pipelineLayout) = 0;
|
||||
|
||||
virtual void SetComputeDescriptorSets(
|
||||
uint32_t firstSet,
|
||||
uint32_t count,
|
||||
RHIDescriptorSet** descriptorSets,
|
||||
RHIPipelineLayout* pipelineLayout) = 0;
|
||||
```
|
||||
|
||||
**RHIDevice 新增工厂方法**:
|
||||
```cpp
|
||||
virtual RHIDescriptorPool* CreateDescriptorPool(const DescriptorPoolDesc& desc) = 0;
|
||||
virtual RHIDescriptorSet* CreateDescriptorSet(RHIDescriptorPool* pool, const DescriptorSetDesc& desc) = 0;
|
||||
```
|
||||
|
||||
**实现说明**:
|
||||
- D3D12:使用 `D3D12DescriptorHeap` 的 GPU/CPU descriptor 分配
|
||||
- OpenGL:使用 `TextureUnitAllocator` 分配 texture unit
|
||||
- 旧的 `SetUniform*/SetGlobal*` 仍保留,向后兼容
|
||||
|
||||
---
|
||||
|
||||
### 3.2 缺少显式 RenderPass
|
||||
|
||||
**问题描述**:当前只有 `SetRenderTargets()`,没有 `BeginRenderPass()` / `EndRenderPass()`:
|
||||
@@ -463,7 +505,7 @@ class RHITexture : public RHIResource { ... };
|
||||
|
||||
| 优先级 | 问题 | 严重性 | 修复难度 | 状态 |
|
||||
|--------|------|--------|----------|------|
|
||||
| 1 | 字符串查找 SetUniform 不符合 D3D12/Vulkan | 🔴 致命 | 高 | ❌ 未完成 |
|
||||
| 1 | 字符串查找 SetUniform 不符合 D3D12/Vulkan | 🔴 致命 | 高 | ✅ 已完成 |
|
||||
| 2 | 缺少显式 RenderPass | 🔴 致命 | 高 | ✅ 已完成 |
|
||||
| 3 | 动态状态太多 | 🔴 高 | 高 | ❌ 未完成 |
|
||||
| 4 | ResourceView 类型不明确 | 🟡 中 | 中 | ✅ 基本完成 |
|
||||
|
||||
Reference in New Issue
Block a user