pub struct ComputePipeline { /* private fields */ }Expand description
Compute pipeline for executing shaders
Represents a compiled compute pipeline that can be executed on the GPU.
Implementations§
Source§impl ComputePipeline
impl ComputePipeline
Sourcepub fn new(shader: WGSLShader) -> Self
pub fn new(shader: WGSLShader) -> Self
Create a new compute pipeline
Sourcepub fn with_bind_group(self, layout: BindGroupLayout) -> Self
pub fn with_bind_group(self, layout: BindGroupLayout) -> Self
Add a bind group layout
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Set pipeline label
Sourcepub fn shader(&self) -> &WGSLShader
pub fn shader(&self) -> &WGSLShader
Get shader
Sourcepub fn bind_groups(&self) -> &[BindGroupLayout]
pub fn bind_groups(&self) -> &[BindGroupLayout]
Get bind groups
Trait Implementations§
Source§impl Clone for ComputePipeline
impl Clone for ComputePipeline
Source§fn clone(&self) -> ComputePipeline
fn clone(&self) -> ComputePipeline
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ComputePipeline
impl RefUnwindSafe for ComputePipeline
impl Send for ComputePipeline
impl Sync for ComputePipeline
impl Unpin for ComputePipeline
impl UnsafeUnpin for ComputePipeline
impl UnwindSafe for ComputePipeline
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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