docs: update RHI API docs

This commit is contained in:
2026-03-20 02:35:45 +08:00
parent ea756c0177
commit 070b444f8f
501 changed files with 13493 additions and 2022 deletions

View File

@@ -4,19 +4,36 @@
virtual void ExecuteCommandLists(uint32_t count, void** lists) = 0;
```
执行命令列表。
将一个或多个命令列表提交到 GPU 执行命令列表会在 GPU 上异步执行,具体执行时机取决于底层图形 API 的调度策略
**参数:**
- `count` - 命令列表数量
- `lists` - 命令列表指针数组
- `count` - 命令列表数量,指定 `lists` 数组中的有效元素个数
- `lists` - 命令列表指针数组,每个元素必须是一个已完成的 `RHICommandList` 对象
**返回:**
**线程安全:** ❌ 非线程安全,应在渲染线程中调用
**复杂度:** O(n) - n 为命令列表中的命令数量
**示例:**
```cpp
void* lists[1] = {cmdList};
cmdQueue->ExecuteCommandLists(1, lists);
#include "RHICommandQueue.h"
#include "RHICommandList.h"
void SubmitDrawCommands(RHICommandQueue* cmdQueue, RHICommandList* cmdList) {
RHICommandList* lists[1] = { cmdList };
cmdList->Begin();
cmdList->SetPipelineState(pipelineState);
cmdList->SetVertexBuffer(vertexBuffer);
cmdList->DrawInstanced(vertices, vertexCount, 0);
cmdList->End();
cmdQueue->ExecuteCommandLists(1, (void**)lists);
}
```
## 相关文档
- [RHICommandQueue 总览](command-queue.md) - 返回类总览
- [RHICommandList](../command-list/command-list.md) - 命令列表