refactor: reorganize docs into plan/ and add skills/

This commit is contained in:
2026-03-18 17:49:22 +08:00
parent fc7c8f6797
commit 9bad996ecf
143 changed files with 13263 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
# D3D12ConstantBufferView
DirectX 12 常量缓冲区视图的 D3D12 实现。
## 头文件
```cpp
#include <XCEngine/RHI/D3D12/D3D12ConstantBufferView.h>
```
## 公共成员函数
### 构造函数与析构函数
#### `D3D12ConstantBufferView()`
默认构造函数。
#### `~D3D12ConstantBufferView()`
析构函数,确保调用 `Shutdown()`
### 初始化
#### `void Initialize(ID3D12Device* device, ID3D12Resource* buffer, const D3D12_CONSTANT_BUFFER_VIEW_DESC* desc = nullptr)`
创建 CBV。
- `buffer`: 缓冲区资源
- `desc`: CBV 描述(可选,会自动设置 size 为 256 字节对齐)
#### `void Shutdown()`
释放 CBV。
### 属性
#### `D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandle() const`
获取 CPU 描述符句柄。
## 内部成员
| 成员 | 类型 | 描述 |
|------|------|------|
| `m_handle` | `D3D12_CPU_DESCRIPTOR_HANDLE` | CPU 描述符句柄 |
| `m_resource` | `ID3D12Resource*` | 关联的缓冲区资源 |
## 备注
- CBV 大小自动向上对齐到 256 字节
- 常量缓冲区应使用 UPLOAD 堆类型以便 CPU 更新
- 可以通过根签名直接绑定 CBV 而无需 CBV 描述符