pub type ArcRenderCommand = RenderCommand<ArcReferences>;Expand description
Equivalent to RenderCommand with the Ids resolved into resource Arcs.
In a render pass, commands are stored in this format between when they are
added to the pass, and when the pass is end()ed and the commands are
replayed to the HAL encoder. Validation occurs when the pass is ended, which
means that parameters stored in an ArcRenderCommand for a pass operation
have generally not been validated.
In a render bundle, commands are stored in this format between when the bundle
is finish()ed and when the bundle is executed. Validation occurs when the
bundle is finished, which means that parameters stored in an ArcRenderCommand
for a render bundle operation must have been validated.
cbindgen:ignore
Aliased Type§
pub enum ArcRenderCommand {
Show 23 variants
SetBindGroup {
index: u32,
num_dynamic_offsets: usize,
bind_group: Option<Arc<BindGroup>>,
},
SetPipeline(Arc<RenderPipeline>),
SetIndexBuffer {
buffer: Arc<Buffer>,
index_format: IndexFormat,
offset: u64,
size: Option<NonZero<u64>>,
},
SetVertexBuffer {
slot: u32,
buffer: Arc<Buffer>,
offset: u64,
size: Option<NonZero<u64>>,
},
SetBlendConstant(Color),
SetStencilReference(u32),
SetViewport {
rect: Rect<f32>,
depth_min: f32,
depth_max: f32,
},
SetScissor(Rect<u32>),
SetImmediate {
offset: u32,
size_bytes: u32,
values_offset: Option<u32>,
},
Draw {
vertex_count: u32,
instance_count: u32,
first_vertex: u32,
first_instance: u32,
},
DrawIndexed {
index_count: u32,
instance_count: u32,
first_index: u32,
base_vertex: i32,
first_instance: u32,
},
DrawMeshTasks {
group_count_x: u32,
group_count_y: u32,
group_count_z: u32,
},
DrawIndirect {
buffer: Arc<Buffer>,
offset: u64,
count: u32,
family: DrawCommandFamily,
vertex_or_index_limit: Option<u64>,
instance_limit: Option<u64>,
},
MultiDrawIndirectCount {
buffer: Arc<Buffer>,
offset: u64,
count_buffer: Arc<Buffer>,
count_buffer_offset: u64,
max_count: u32,
family: DrawCommandFamily,
},
PushDebugGroup {
color: u32,
len: usize,
},
PopDebugGroup,
InsertDebugMarker {
color: u32,
len: usize,
},
WriteTimestamp {
query_set: Arc<QuerySet>,
query_index: u32,
},
BeginOcclusionQuery {
query_index: u32,
},
EndOcclusionQuery,
BeginPipelineStatisticsQuery {
query_set: Arc<QuerySet>,
query_index: u32,
},
EndPipelineStatisticsQuery,
ExecuteBundle(Arc<RenderBundle>),
}Variants§
SetBindGroup
SetPipeline(Arc<RenderPipeline>)
SetIndexBuffer
SetVertexBuffer
SetBlendConstant(Color)
SetStencilReference(u32)
SetViewport
SetScissor(Rect<u32>)
SetImmediate
Set a range of immediates to values stored in [BasePass::immediates_data].
See [wgpu::RenderPass::set_immediates] for a detailed explanation
of the restrictions these commands must satisfy.
Fields
offset: u32The byte offset within the immediate data storage to write to. This must be a multiple of four.
values_offset: Option<u32>Index in [BasePass::immediates_data] of the start of the data
to be written.
Note: this is not a byte offset like offset. Rather, it is the
index of the first u32 element in immediates_data to read.
None means zeros should be written to the destination range, and
there is no corresponding data in immediates_data. This is used
by render bundles, which explicitly clear out any state that
post-bundle code might see.
Draw
DrawIndexed
DrawMeshTasks
DrawIndirect
Fields
family: DrawCommandFamilyMultiDrawIndirectCount
Fields
family: DrawCommandFamily