wgpu_halTrait DynCommandEncoder
Source pub trait DynCommandEncoder: DynResource + Debug {
Show 43 methods
// Required methods
unsafe fn begin_encoding(
&mut self,
label: Label<'_>,
) -> 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,
range: MemoryRange,
);
unsafe fn copy_buffer_to_buffer(
&mut self,
src: &dyn DynBuffer,
dst: &dyn DynBuffer,
regions: &[BufferCopy],
);
unsafe fn copy_texture_to_texture(
&mut self,
src: &dyn DynTexture,
src_usage: TextureUses,
dst: &dyn DynTexture,
regions: &[TextureCopy],
);
unsafe fn copy_buffer_to_texture(
&mut self,
src: &dyn DynBuffer,
dst: &dyn DynTexture,
regions: &[BufferTextureCopy],
);
unsafe fn copy_texture_to_buffer(
&mut self,
src: &dyn DynTexture,
src_usage: TextureUses,
dst: &dyn DynBuffer,
regions: &[BufferTextureCopy],
);
unsafe fn set_bind_group(
&mut self,
layout: &dyn DynPipelineLayout,
index: u32,
group: Option<&dyn DynBindGroup>,
dynamic_offsets: &[DynamicOffset],
);
unsafe fn set_push_constants(
&mut self,
layout: &dyn DynPipelineLayout,
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, index: u32);
unsafe fn end_query(&mut self, set: &dyn DynQuerySet, index: u32);
unsafe fn write_timestamp(&mut self, set: &dyn DynQuerySet, index: u32);
unsafe fn reset_queries(&mut self, set: &dyn DynQuerySet, range: Range<u32>);
unsafe fn copy_query_results(
&mut self,
set: &dyn DynQuerySet,
range: Range<u32>,
buffer: &dyn DynBuffer,
offset: BufferAddress,
stride: BufferSize,
);
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);
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,
offset: BufferAddress,
draw_count: u32,
);
unsafe fn draw_indexed_indirect(
&mut self,
buffer: &dyn DynBuffer,
offset: BufferAddress,
draw_count: u32,
);
unsafe fn draw_indirect_count(
&mut self,
buffer: &dyn DynBuffer,
offset: BufferAddress,
count_buffer: &dyn DynBuffer,
count_offset: BufferAddress,
max_count: u32,
);
unsafe fn draw_indexed_indirect_count(
&mut self,
buffer: &dyn DynBuffer,
offset: BufferAddress,
count_buffer: &dyn DynBuffer,
count_offset: BufferAddress,
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);
unsafe fn dispatch(&mut self, count: [u32; 3]);
unsafe fn dispatch_indirect(
&mut self,
buffer: &dyn DynBuffer,
offset: BufferAddress,
);
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,
);
}