pub struct GpuCommandEncoder { /* private fields */ }Expand description
A command encoder — records GPU commands into a command buffer.
Implementations§
Source§impl GpuCommandEncoder
impl GpuCommandEncoder
Sourcepub fn begin_render_pass<'a>(
&'a mut self,
desc: &RenderPassDescriptor<'a>,
) -> GpuRenderPass<'a>
pub fn begin_render_pass<'a>( &'a mut self, desc: &RenderPassDescriptor<'a>, ) -> GpuRenderPass<'a>
Begin a render pass.
Sourcepub fn begin_compute_pass(
&mut self,
desc: &ComputePassDescriptor<'_>,
) -> GpuComputePass<'_>
pub fn begin_compute_pass( &mut self, desc: &ComputePassDescriptor<'_>, ) -> GpuComputePass<'_>
Begin a compute pass.
Sourcepub fn copy_buffer_to_buffer(
&mut self,
source: &GpuBuffer,
source_offset: BufferAddress,
destination: &GpuBuffer,
destination_offset: BufferAddress,
size: BufferAddress,
)
pub fn copy_buffer_to_buffer( &mut self, source: &GpuBuffer, source_offset: BufferAddress, destination: &GpuBuffer, destination_offset: BufferAddress, size: BufferAddress, )
Copy data between buffers.
Sourcepub fn copy_buffer_to_texture(
&mut self,
source: TexelCopyBufferInfo<'_>,
destination: TexelCopyTextureInfo<'_>,
copy_size: Extent3d,
)
pub fn copy_buffer_to_texture( &mut self, source: TexelCopyBufferInfo<'_>, destination: TexelCopyTextureInfo<'_>, copy_size: Extent3d, )
Copy buffer data to a texture.
Sourcepub fn copy_texture_to_buffer(
&mut self,
source: TexelCopyTextureInfo<'_>,
destination: TexelCopyBufferInfo<'_>,
copy_size: Extent3d,
)
pub fn copy_texture_to_buffer( &mut self, source: TexelCopyTextureInfo<'_>, destination: TexelCopyBufferInfo<'_>, copy_size: Extent3d, )
Copy texture data to a buffer.
Sourcepub fn copy_texture_to_texture(
&mut self,
source: TexelCopyTextureInfo<'_>,
destination: TexelCopyTextureInfo<'_>,
copy_size: Extent3d,
)
pub fn copy_texture_to_texture( &mut self, source: TexelCopyTextureInfo<'_>, destination: TexelCopyTextureInfo<'_>, copy_size: Extent3d, )
Copy between textures.
Sourcepub fn finish(self) -> GpuCommandBuffer
pub fn finish(self) -> GpuCommandBuffer
Finish recording and produce a command buffer for submission.
Sourcepub fn raw(&self) -> &CommandEncoder
pub fn raw(&self) -> &CommandEncoder
Access the underlying wgpu encoder.
Sourcepub fn raw_mut(&mut self) -> &mut CommandEncoder
pub fn raw_mut(&mut self) -> &mut CommandEncoder
Access the underlying wgpu encoder mutably.
Auto Trait Implementations§
impl Freeze for GpuCommandEncoder
impl !RefUnwindSafe for GpuCommandEncoder
impl Send for GpuCommandEncoder
impl Sync for GpuCommandEncoder
impl Unpin for GpuCommandEncoder
impl UnsafeUnpin for GpuCommandEncoder
impl !UnwindSafe for GpuCommandEncoder
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more