pub struct CommandEncoder { /* private fields */ }
Expand description
Encodes a series of GPU operations
Accumulates render passes, compute passes, and GPU transfer commands. No work is submitted to the GPU until the command encoder is dropped.
This is more or less the equivalent to wgpu::CommandEncoder
Implementations§
Source§impl CommandEncoder
impl CommandEncoder
pub fn new(label: Option<&str>, context: &Context) -> Self
Sourcepub fn compute_pass(&mut self, label: Option<&str>) -> ComputePass<'_>
pub fn compute_pass(&mut self, label: Option<&str>) -> ComputePass<'_>
Begin a ComputePass
Sourcepub fn render_pass(
&mut self,
label: Option<&str>,
color_attachments: Vec<ColorAttachment>,
depth_stencil_attachment: Option<DepthStencilAttachment>,
multisample: Option<MultisampleState>,
) -> RenderPass<'_>
pub fn render_pass( &mut self, label: Option<&str>, color_attachments: Vec<ColorAttachment>, depth_stencil_attachment: Option<DepthStencilAttachment>, multisample: Option<MultisampleState>, ) -> RenderPass<'_>
Begin a RenderPass
pub fn clear_buffer(&mut self, buffer: &Buffer, offset: u64, size: Option<u64>)
pub fn copy_buffer_to_buffer( &mut self, source: &Buffer, source_offset: usize, destination: &Buffer, destination_offset: usize, size: usize, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandEncoder
impl !RefUnwindSafe for CommandEncoder
impl !Send for CommandEncoder
impl !Sync for CommandEncoder
impl Unpin for CommandEncoder
impl !UnwindSafe for CommandEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more