Expand description
Batching functionality when GPU preprocessing is in use.
Structs§
- The GPU buffers holding the data needed to render batches.
- The work item buffers we use when GPU occlusion culling is in use.
- Records whether GPU preprocessing and/or GPU culling are supported on the device.
- A structure, shared between CPU and GPU, that holds the number of on-GPU indirect draw commands for each batch set.
- The buffers containing all the information that indirect draw commands (
multi_draw_indirect
,multi_draw_indirect_count
) use to draw the scene. - A structure, initialized on CPU and read on GPU, that contains metadata about each batch.
- A structure, written and read GPU, that records how many instances of each mesh are actually to be drawn.
- The
wgpu
indirect parameters structure that specifies a GPU draw command. - The
wgpu
indirect parameters structure that specifies a GPU draw command. - Holds the GPU buffer of instance input data, which is the data about each mesh instance that the CPU provides.
- A GPU-side data structure that stores the number of workgroups to dispatch for the second phase of GPU occlusion culling.
- The buffers containing all the information that indirect draw commands use to draw the scene, for a single mesh class (indexed or non-indexed), for a single phase.
- The GPU buffers holding the data needed to render batches for a single phase.
- The buffers containing all the information that indirect draw commands use to draw the scene, for a single phase.
- One invocation of the preprocessing shader: i.e. one mesh instance in a view.
- The GPU buffers holding the data needed to render batches for a single phase, without a type parameter for that phase.
- The buffers containing all the information that indirect draw commands use to draw the scene, for a single phase.
Enums§
- The amount of GPU preprocessing (compute and indirect draw) that we do.
- The buffer of GPU preprocessing work items for a single view.
Functions§
- Creates batches for a render phase that uses bins.
- Batch the items in a sorted render phase, when GPU instance buffer building is in use. This means comparing metadata needed to draw each phase item and trying to combine the draws into a batch.
- A system that runs early in extraction and clears out all the
BatchedInstanceBuffers
for the frame. - A system that gathers up the per-phase GPU buffers and inserts them into the
BatchedInstanceBuffers
andIndirectParametersBuffers
tables. - A system that removes GPU preprocessing work item buffers that correspond to deleted
ExtractedView
s. - Returns the set of work item buffers for the given view, first creating it if necessary.
- Initializes work item buffers for a phase in preparation for a new frame.
- A system that writes all instance buffers to the GPU.