Module gpu_preprocessing

Source
Expand description

Batching functionality when GPU preprocessing is in use.

Structs§

BatchedInstanceBuffers
The GPU buffers holding the data needed to render batches.
BatchingPlugin
GpuOcclusionCullingWorkItemBuffers
The work item buffers we use when GPU occlusion culling is in use.
GpuPreprocessingSupport
Records whether GPU preprocessing and/or GPU culling are supported on the device.
IndirectBatchSet
A structure, shared between CPU and GPU, that holds the number of on-GPU indirect draw commands for each batch set.
IndirectParametersBuffers
The buffers containing all the information that indirect draw commands (multi_draw_indirect, multi_draw_indirect_count) use to draw the scene.
IndirectParametersCpuMetadata
A structure, initialized on CPU and read on GPU, that contains metadata about each batch.
IndirectParametersGpuMetadata
A structure, written and read GPU, that records how many instances of each mesh are actually to be drawn.
IndirectParametersIndexed
The wgpu indirect parameters structure that specifies a GPU draw command.
IndirectParametersNonIndexed
The wgpu indirect parameters structure that specifies a GPU draw command.
InstanceInputUniformBuffer
Holds the GPU buffer of instance input data, which is the data about each mesh instance that the CPU provides.
LatePreprocessWorkItemIndirectParameters
A GPU-side data structure that stores the number of workgroups to dispatch for the second phase of GPU occlusion culling.
MeshClassIndirectParametersBuffers
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.
PhaseBatchedInstanceBuffers
The GPU buffers holding the data needed to render batches for a single phase.
PhaseIndirectParametersBuffers
The buffers containing all the information that indirect draw commands use to draw the scene, for a single phase.
PreprocessWorkItem
One invocation of the preprocessing shader: i.e. one mesh instance in a view.
UntypedPhaseBatchedInstanceBuffers
The GPU buffers holding the data needed to render batches for a single phase, without a type parameter for that phase.
UntypedPhaseIndirectParametersBuffers
The buffers containing all the information that indirect draw commands use to draw the scene, for a single phase.

Enums§

GpuPreprocessingMode
The amount of GPU preprocessing (compute and indirect draw) that we do.
PreprocessWorkItemBuffers
The buffer of GPU preprocessing work items for a single view.

Functions§

batch_and_prepare_binned_render_phase
Creates batches for a render phase that uses bins.
batch_and_prepare_sorted_render_phase
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.
clear_batched_gpu_instance_buffers
A system that runs early in extraction and clears out all the BatchedInstanceBuffers for the frame.
clear_indirect_parameters_buffers
collect_buffers_for_phase
A system that gathers up the per-phase GPU buffers and inserts them into the BatchedInstanceBuffers and IndirectParametersBuffers tables.
delete_old_work_item_buffers
A system that removes GPU preprocessing work item buffers that correspond to deleted ExtractedViews.
get_or_create_work_item_buffer
Returns the set of work item buffers for the given view, first creating it if necessary.
init_work_item_buffers
Initializes work item buffers for a phase in preparation for a new frame.
write_batched_instance_buffers
A system that writes all instance buffers to the GPU.
write_indirect_parameters_buffers