Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.

Structures

MeshInput

#

Per-frame data that the CPU supplies to the GPU.

struct MeshInput {
world_from_local: mat3x4<f32> ,
lightmap_uv_rect: vec2<u32> ,
flags: u32 ,
previous_input_index: u32 ,
first_vertex_index: u32 ,
first_index_index: u32 ,
index_count: u32 ,
current_skin_index: u32 ,
material_and_lightmap_bind_group_slot: u32 ,
timestamp: u32 ,
tag: u32 ,
morph_descriptor_index: u32 ,
metadata_index: u32 ,
}

PreviousMeshInput

#

Per-mesh-instance data that we retain from the previous frame.

struct PreviousMeshInput {
world_from_local: mat3x4<f32> ,
}

IndirectParametersIndexed

#

The wgpu indirect parameters structure. This is a union of two structures. For more information, see the corresponding comment in gpu_preprocessing.rs.

struct IndirectParametersIndexed {
index_count: u32 ,
instance_count: u32 ,
first_index: u32 ,
base_vertex: u32 ,
first_instance: u32 ,
}

IndirectParametersNonIndexed

#
struct IndirectParametersNonIndexed {
vertex_count: u32 ,
instance_count: u32 ,
base_vertex: u32 ,
first_instance: u32 ,
}

IndirectParametersMetadata

#

Typically, the uniform allocation and mesh preprocessing phases fill in this structure. However, parts of it may be filled in on the CPU for objects that aren’t multidrawn.

struct IndirectParametersMetadata {
base_output_index: u32 ,
batch_set_index: u32 ,
mesh_index: u32 ,
@if(WRITE_INDIRECT_PARAMETERS_METADATA)
early_instance_count: atomic<u32> ,
@if(WRITE_INDIRECT_PARAMETERS_METADATA)
late_instance_count: atomic<u32> ,
@if(!WRITE_INDIRECT_PARAMETERS_METADATA)
early_instance_count: u32 ,
@if(!WRITE_INDIRECT_PARAMETERS_METADATA)
late_instance_count: u32 ,
}

IndirectBatchSet

#
struct IndirectBatchSet {
indirect_parameters_count: atomic<u32> ,
indirect_parameters_base: u32 ,
}

PreprocessWorkItem

#

One invocation of this compute shader: i.e. one mesh instance in a view.

struct PreprocessWorkItem {
input_index: u32 ,
output_or_indirect_parameters_index: u32 ,
}

BinMetadata

#

This is maintained by the CPU and cached for bins that don’t change from frame to frame.

struct BinMetadata {
indirect_parameters_offset: u32 ,
bin_index: u32 ,
instance_count: u32 ,
}
Contents