Files
XCEngine/docs/api/rhi/command-list/dispatch.md

32 lines
688 B
Markdown
Raw Normal View History

# RHICommandList::Dispatch
```cpp
virtual void Dispatch(uint32_t x, uint32_t y, uint32_t z) = 0;
```
2026-03-20 02:35:45 +08:00
分发计算着色器线程组。用于执行计算着色器Compute Shader将工作分配到三维线程网格中。
**参数:**
- `x` - X 方向线程组数量
- `y` - Y 方向线程组数量
- `z` - Z 方向线程组数量
2026-03-20 02:35:45 +08:00
**返回:** `void`
**异常:** 无
**线程安全:** ❌
**复杂度:** O(x * y * z)
**示例:**
```cpp
cmdList->Dispatch(8, 8, 1); // 分发 8x8x1 线程组
```
## 相关文档
- [RHICommandList 总览](command-list.md) - 返回类总览
2026-03-20 02:35:45 +08:00
- [SetPipelineState](set-pipeline-state.md) - 设置管线状态
- [Draw](draw.md) - 绘制