Skip to main content

Module gpu_preprocessing

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
BinUnpackingBuffers
A resource, part of the render world, that holds all GPU buffers used for the bin unpacking shader.
BinUnpackingBuffersKey
A key used to look up the bin unpacking buffers for a specific phase of a specific view.
BinUnpackingJob
CPU-side information needed to construct the bind groups and issue the dispatch for the unpack_bins shader, for a single batch set.
BinUnpackingMetadataIndex
The index of the metadata corresponding to one bin unpacking job in the BinUnpackingBuffers::bin_unpacking_metadata buffer.
GpuBinUnpackingMetadata
GPU-side information needed to unpack bins belonging to a single batch set.
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.
IndirectParametersBuffersSettings
Configuration for IndirectParametersBuffers.
IndirectParametersCpuMetadata
A structure, initialized on CPU and read on GPU, that contains metadata about each batch.
IndirectParametersGpuMetadata
A structure, written and read on 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.
PreviousInstanceInputUniformBuffer
Stores the input uniforms for the previous frame.
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.
ViewPhaseBinUnpackingBuffers
GPU buffers for the bin unpacking shader that are specific to each phase of each view.

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_bin_unpacking_buffers
Clears out the BinUnpackingBuffers in preparation for a new 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_binned_instance_buffers
Writes the bin data for each render phase to the GPU.
write_indirect_parameters_buffers