pub struct ComputeDescriptor<'a> {
pub label: Option<&'a str>,
pub shader_source: &'a str,
pub entry_point: Option<&'a str>,
pub entries: Vec<BindingEntry>,
pub own_group: Option<u32>,
pub extra_layouts: Vec<OwnedGroupLayout>,
}Expand description
Describes a compute pipeline + its own bind group, the source type
GPUCompute is built from via build_compute.
Fields§
§label: Option<&'a str>Debug label, threaded through to the shader module, pipeline, and bind group layout.
shader_source: &'a strWGSL source for the compute stage.
entry_point: Option<&'a str>Compute stage entry point. Defaults to "cs_main".
entries: Vec<BindingEntry>This compute pass’s own bind group entries. See
BindingKind for what a
compute-appropriate entry looks like — build_compute panics if
any entry here isn’t exactly COMPUTE-visible.
own_group: Option<u32>Which @group(N) the layout built from entries occupies in the pipeline, or
None if this compute pass has no entries of its own (e.g. it only uses extra_layouts).
extra_layouts: Vec<OwnedGroupLayout>Additional bind group layouts, each tagged with the @group(N) it occupies.
Every index from 0 up to the highest one used (including own_group, if set) must
be covered exactly once, or build_compute panics — this makes group assignment
explicit instead of inferred from field order.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ComputeDescriptor<'a>
impl<'a> !UnwindSafe for ComputeDescriptor<'a>
impl<'a> Freeze for ComputeDescriptor<'a>
impl<'a> Send for ComputeDescriptor<'a>
impl<'a> Sync for ComputeDescriptor<'a>
impl<'a> Unpin for ComputeDescriptor<'a>
impl<'a> UnsafeUnpin for ComputeDescriptor<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Component for T
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>
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>
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)
&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)
&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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().