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
BinUnpackingMetadataIndex
The index of the metadata corresponding to one bin unpacking job in the SceneUnpackingBuffers::bin_unpacking_metadata buffer.
BuildIndirectParametersMetadata
Metadata that describes how to dispatch the indirect parameters building shader.
GpuBinMetadata
Information about each bin in a batch set.
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.
GpuUniformAllocationMetadata
Information needed to allocate MeshUniforms on the GPU.
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.
IndirectParametersBuildJob
A GPU type that specifies the range of batches that each build_indirect_params shader invocation is to process.
IndirectParametersBuildJobs
A resource, part of the render world, that stores the GPU buffer that specifies all the batch ranges that all invocations of the indirect parameters building shader are to process.
IndirectParametersIndexed
The wgpu indirect parameters structure that specifies a GPU draw command.
IndirectParametersMetadata
A structure, written and read on GPU, that records how many instances of each mesh are actually to be drawn.
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.
MeshClassBuildIndirectParametersMetadata
Metadata that describes how to dispatch the indirect parameters building shader for a single combination of render phase, view, and mesh class (indexed or non-indexed).
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.
PhaseBuildIndirectParametersMetadata
Metadata that describes how to dispatch the indirect parameters building shader for a single render phase in a single view.
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.
SceneUnpackingBuffers
A resource, part of the render world, that holds all GPU buffers used for the bin unpacking and uniform allocation shaders.
SceneUnpackingBuffersKey
A key used to look up the bin unpacking buffers for a specific phase of a specific view.
SceneUnpackingJob
CPU-side information needed to construct the bind groups and issue the dispatch for the unpack_bins and allocate_uniforms shaders, for a single batch set.
UniformAllocationMetadataIndex
The index of the metadata corresponding to one uniform allocation job in the SceneUnpackingBuffers::uniform_allocation_metadata buffer.
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.
ViewBuildIndirectParametersMetadata
Metadata that describes how to dispatch the indirect parameters building shader for a single view.
ViewPhaseSceneUnpackingBuffers
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.

Traits§

BufferDataInput
A trait that defines the data that we supply to the GPU for a single mesh instance (2D or 3D).
MeshClassIndirectParameters
GPU-side indirect draw parameters for either indexed or non-indexed meshes.

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
clear_scene_unpacking_buffers
Clears out the SceneUnpackingBuffers in preparation for a new frame.
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.
prepare_indirect_parameters_build_jobs
A system, part of the render world, that gathers up the batch ranges from IndirectParametersBuffers and prepares the BuildIndirectParametersMetadata that describes the range of batches that each indirect parameters building shader invocation is to process.
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
write_indirect_parameters_build_jobs
A render-world system that writes the dynamic uniform buffer containing all IndirectParametersBuildJobs to the GPU.