pub trait DynCommandEncoder: DynResource + Debug {
Show 43 methods
// Required methods
unsafe fn begin_encoding(
&mut self,
label: Option<&str>,
) -> Result<(), DeviceError>;
unsafe fn discard_encoding(&mut self);
unsafe fn end_encoding(
&mut self,
) -> Result<Box<dyn DynCommandBuffer>, DeviceError>;
unsafe fn reset_all(
&mut self,
command_buffers: Vec<Box<dyn DynCommandBuffer>>,
);
unsafe fn transition_buffers(
&mut self,
barriers: &[BufferBarrier<'_, dyn DynBuffer>],
);
unsafe fn transition_textures(
&mut self,
barriers: &[TextureBarrier<'_, dyn DynTexture>],
);
unsafe fn clear_buffer(
&mut self,
buffer: &(dyn DynBuffer + 'static),
range: Range<u64>,
);
unsafe fn copy_buffer_to_buffer(
&mut self,
src: &(dyn DynBuffer + 'static),
dst: &(dyn DynBuffer + 'static),
regions: &[BufferCopy],
);
unsafe fn copy_texture_to_texture(
&mut self,
src: &(dyn DynTexture + 'static),
src_usage: TextureUses,
dst: &(dyn DynTexture + 'static),
regions: &[TextureCopy],
);
unsafe fn copy_buffer_to_texture(
&mut self,
src: &(dyn DynBuffer + 'static),
dst: &(dyn DynTexture + 'static),
regions: &[BufferTextureCopy],
);
unsafe fn copy_texture_to_buffer(
&mut self,
src: &(dyn DynTexture + 'static),
src_usage: TextureUses,
dst: &(dyn DynBuffer + 'static),
regions: &[BufferTextureCopy],
);
unsafe fn set_bind_group(
&mut self,
layout: &(dyn DynPipelineLayout + 'static),
index: u32,
group: Option<&(dyn DynBindGroup + 'static)>,
dynamic_offsets: &[u32],
);
unsafe fn set_push_constants(
&mut self,
layout: &(dyn DynPipelineLayout + 'static),
stages: ShaderStages,
offset_bytes: u32,
data: &[u32],
);
unsafe fn insert_debug_marker(&mut self, label: &str);
unsafe fn begin_debug_marker(&mut self, group_label: &str);
unsafe fn end_debug_marker(&mut self);
unsafe fn begin_query(
&mut self,
set: &(dyn DynQuerySet + 'static),
index: u32,
);
unsafe fn end_query(
&mut self,
set: &(dyn DynQuerySet + 'static),
index: u32,
);
unsafe fn write_timestamp(
&mut self,
set: &(dyn DynQuerySet + 'static),
index: u32,
);
unsafe fn reset_queries(
&mut self,
set: &(dyn DynQuerySet + 'static),
range: Range<u32>,
);
unsafe fn copy_query_results(
&mut self,
set: &(dyn DynQuerySet + 'static),
range: Range<u32>,
buffer: &(dyn DynBuffer + 'static),
offset: u64,
stride: NonZero<u64>,
);
unsafe fn begin_render_pass(
&mut self,
desc: &RenderPassDescriptor<'_, dyn DynQuerySet, dyn DynTextureView>,
);
unsafe fn end_render_pass(&mut self);
unsafe fn set_render_pipeline(
&mut self,
pipeline: &(dyn DynRenderPipeline + 'static),
);
unsafe fn set_index_buffer<'a>(
&mut self,
binding: BufferBinding<'a, dyn DynBuffer>,
format: IndexFormat,
);
unsafe fn set_vertex_buffer<'a>(
&mut self,
index: u32,
binding: BufferBinding<'a, dyn DynBuffer>,
);
unsafe fn set_viewport(&mut self, rect: &Rect<f32>, depth_range: Range<f32>);
unsafe fn set_scissor_rect(&mut self, rect: &Rect<u32>);
unsafe fn set_stencil_reference(&mut self, value: u32);
unsafe fn set_blend_constants(&mut self, color: &[f32; 4]);
unsafe fn draw(
&mut self,
first_vertex: u32,
vertex_count: u32,
first_instance: u32,
instance_count: u32,
);
unsafe fn draw_indexed(
&mut self,
first_index: u32,
index_count: u32,
base_vertex: i32,
first_instance: u32,
instance_count: u32,
);
unsafe fn draw_indirect(
&mut self,
buffer: &(dyn DynBuffer + 'static),
offset: u64,
draw_count: u32,
);
unsafe fn draw_indexed_indirect(
&mut self,
buffer: &(dyn DynBuffer + 'static),
offset: u64,
draw_count: u32,
);
unsafe fn draw_indirect_count(
&mut self,
buffer: &(dyn DynBuffer + 'static),
offset: u64,
count_buffer: &(dyn DynBuffer + 'static),
count_offset: u64,
max_count: u32,
);
unsafe fn draw_indexed_indirect_count(
&mut self,
buffer: &(dyn DynBuffer + 'static),
offset: u64,
count_buffer: &(dyn DynBuffer + 'static),
count_offset: u64,
max_count: u32,
);
unsafe fn begin_compute_pass(
&mut self,
desc: &ComputePassDescriptor<'_, dyn DynQuerySet>,
);
unsafe fn end_compute_pass(&mut self);
unsafe fn set_compute_pipeline(
&mut self,
pipeline: &(dyn DynComputePipeline + 'static),
);
unsafe fn dispatch(&mut self, count: [u32; 3]);
unsafe fn dispatch_indirect(
&mut self,
buffer: &(dyn DynBuffer + 'static),
offset: u64,
);
unsafe fn build_acceleration_structures<'a>(
&mut self,
descriptors: &'a [BuildAccelerationStructureDescriptor<'a, dyn DynBuffer, dyn DynAccelerationStructure>],
);
unsafe fn place_acceleration_structure_barrier(
&mut self,
barrier: AccelerationStructureBarrier,
);
}