Files
XCEngine/docs/api/rhi/command-list/dispatch.md
2026-03-20 02:35:45 +08:00

32 lines
688 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RHICommandList::Dispatch
```cpp
virtual void Dispatch(uint32_t x, uint32_t y, uint32_t z) = 0;
```
分发计算着色器线程组。用于执行计算着色器Compute Shader将工作分配到三维线程网格中。
**参数:**
- `x` - X 方向线程组数量
- `y` - Y 方向线程组数量
- `z` - Z 方向线程组数量
**返回:** `void`
**异常:**
**线程安全:**
**复杂度:** O(x * y * z)
**示例:**
```cpp
cmdList->Dispatch(8, 8, 1); // 分发 8x8x1 线程组
```
## 相关文档
- [RHICommandList 总览](command-list.md) - 返回类总览
- [SetPipelineState](set-pipeline-state.md) - 设置管线状态
- [Draw](draw.md) - 绘制