Compute pipeline that generates DrawCommand entries for a Scene entirely on the GPU.
| GenerateDrawCommands |
( |
pipeline_id |
pipelineId, |
|
|
const vireo::Buffer & |
activeInstancesBuffer, |
|
|
const DeviceMemoryArray & |
instancesArray, |
|
|
const DeviceMemoryArray & |
meshInstancesArray, |
|
|
const vireo::Buffer & |
drawCommandsBuffer, |
|
|
const vireo::Buffer & |
drawCommandsCountBuffer |
|
) |
| |
Constructs a GpuDrawSetup pipeline.
- Parameters
-
| pipelineId | Identifier of the parent material pipeline (debug names). |
| activeInstancesBuffer | GPU buffer of active instanceIndex values |
| instancesArray | Global instances buffer |
| meshInstancesArray | Scene meshInstances buffer |
| drawCommandsBuffer | Output DrawCommand buffer. |
| drawCommandsCountBuffer | Atomic counter buffer, reset each frame. |
| virtual ~GenerateDrawCommands |
( |
| ) |
|
|
virtualdefault |
| GenerateDrawCommands |
( |
GenerateDrawCommands & |
| ) |
|
|
delete |
Releases shared (static) GPU resources. Call once at shutdown.
| void dispatch |
( |
vireo::CommandList & |
commandList, |
|
|
uint32 |
activeInstancesCount |
|
) |
| |
Clears the counter then dispatches the compute shader.
- Parameters
-
| commandList | Command list to record into. |
| activeInstancesCount | Number of entries in activeInstancesBuffer. |
| GenerateDrawCommands& operator= |
( |
GenerateDrawCommands & |
| ) |
|
|
delete |