载入中...
搜索中...
未找到
eve::graphics::IndirectBuilder类 参考

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.h22 行定义.

成员函数说明

◆ 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.cpp11 行定义.

被这些函数引用 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.cpp17 行定义.

引用了 a, b, idx, eve::graphics::GpuIndirectCommand::indexCount , 以及 m.

被这些函数引用 eve::graphics::vulkan::Graphics::gpuDrivenCullBegin() , 以及 eve::graphics::vulkan::Graphics::gpuDrivenSubmitOpaque().

◆ commands()

const std::vector< GpuIndirectCommand > & eve::graphics::IndirectBuilder::commands ( ) const
inline

◆ drawCount()

uint32_t eve::graphics::IndirectBuilder::drawCount ( ) const
inline

在文件 IndirectBuilder.h39 行定义.

◆ reset()

void eve::graphics::IndirectBuilder::reset ( )

在文件 IndirectBuilder.cpp5 行定义.

◆ sortedInstanceOrder()

const std::vector< uint32_t > & eve::graphics::IndirectBuilder::sortedInstanceOrder ( ) const
inline

Instance indices in the sorted order the caller must upload.

在文件 IndirectBuilder.h36 行定义.

被这些函数引用 eve::graphics::vulkan::Graphics::gpuDrivenCullBegin() , 以及 eve::graphics::vulkan::Graphics::gpuDrivenSubmitOpaque().


该类的文档由以下文件生成: