CPU-side builder for GPU-driven indirect draws (stage 1). 更多...
#include <IndirectBuilder.h>
Public 成员函数 | |
| void | reset () |
| void | add (uint32_t seq, uint32_t meshId, uint32_t materialId, uint32_t pipelineId) |
| seq = monotonic instance sequence (stable order tiebreak). | |
| uint32_t | build (const std::vector< GpuMeshRecord > &meshTable) |
Sort + merge. meshTable supplies indexCount/firstIndex/vertexBase. | |
| const std::vector< uint32_t > & | sortedInstanceOrder () const |
| Instance indices in the sorted order the caller must upload. | |
| const std::vector< GpuIndirectCommand > & | commands () const |
| uint32_t | drawCount () const |
详细描述
CPU-side builder for GPU-driven indirect draws (stage 1).
Collects (instance, mesh, material, pipeline) tuples, sorts them by a 64-bit key (pipeline > material > mesh, stable by instance sequence), then merges consecutive equal buckets into one GpuIndirectCommand per bucket.
The caller writes the instance buffer in sortedInstanceOrder() so every bucket is a contiguous range; each command's firstInstance points at the bucket start in that buffer.
在文件 IndirectBuilder.h 第 22 行定义.
成员函数说明
◆ add()
| void eve::graphics::IndirectBuilder::add | ( | uint32_t | seq, |
| uint32_t | meshId, | ||
| uint32_t | materialId, | ||
| uint32_t | pipelineId | ||
| ) |
seq = monotonic instance sequence (stable order tiebreak).
在文件 IndirectBuilder.cpp 第 11 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::gpuDrivenCullBegin() , 以及 eve::graphics::vulkan::Graphics::gpuDrivenSubmitOpaque().
◆ build()
| uint32_t eve::graphics::IndirectBuilder::build | ( | const std::vector< GpuMeshRecord > & | meshTable | ) |
Sort + merge. meshTable supplies indexCount/firstIndex/vertexBase.
- 返回
- number of indirect draws produced.
在文件 IndirectBuilder.cpp 第 17 行定义.
引用了 a, b, idx, eve::graphics::GpuIndirectCommand::indexCount , 以及 m.
被这些函数引用 eve::graphics::vulkan::Graphics::gpuDrivenCullBegin() , 以及 eve::graphics::vulkan::Graphics::gpuDrivenSubmitOpaque().
◆ commands()
|
inline |
◆ drawCount()
|
inline |
在文件 IndirectBuilder.h 第 39 行定义.
◆ reset()
| void eve::graphics::IndirectBuilder::reset | ( | ) |
在文件 IndirectBuilder.cpp 第 5 行定义.
◆ sortedInstanceOrder()
|
inline |
Instance indices in the sorted order the caller must upload.
在文件 IndirectBuilder.h 第 36 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::gpuDrivenCullBegin() , 以及 eve::graphics::vulkan::Graphics::gpuDrivenSubmitOpaque().
该类的文档由以下文件生成:
- src/modules/graphics/IndirectBuilder.h
- src/modules/graphics/IndirectBuilder.cpp