pub enum GroupEntry {
Own(Vec<BindingEntry>),
Layout(BindGroupLayout),
Global(&'static str),
}Expand description
One @group(N) slot in a material/compute pipeline layout — position in the
Material::entries/
Compute::entries list is its @group(N) index, so
there’s no separate group number to keep in sync with the shader by hand: the first element
occupies @group(0), the second @group(1), and so on.
Variants§
Own(Vec<BindingEntry>)
This material/compute’s own bind group entries — built into a fresh layout
internally, and the one group GPUMaterial/
GPUCompute hand to a
GPUBindingInstance to bind concrete resources
against at draw/dispatch time. At most one Own entry is allowed in a single
.entries(...) list — build_material/build_compute panic on a second one, since
there’s only one instance-bindable group per material/compute.
Layout(BindGroupLayout)
An already-built layout occupying this position directly — a camera, lights, or any
other external bind group layout, e.g. pulled from a GlobalLayoutPool via
GlobalLayoutPool::get.
Global(&'static str)
A layout looked up by name in the GlobalLayoutPool resource, resolved lazily at
upload time rather than when .entries(...) is called — so the material/compute
doesn’t need name to already be registered while it’s being described, only by the
time it actually uploads. If name isn’t registered yet, upload quietly returns None
and retries next tick, the same “not ready” convention as any other Deps. Prefer this
over resolving GlobalLayoutPool::get yourself and wrapping the result in
Layout — that requires the pool to already have name at the point
you build the descriptor, which is a race the setup system authoring a material has
no natural way to wait out on its own.
Auto Trait Implementations§
impl !RefUnwindSafe for GroupEntry
impl !UnwindSafe for GroupEntry
impl Freeze for GroupEntry
impl Send for GroupEntry
impl Sync for GroupEntry
impl Unpin for GroupEntry
impl UnsafeUnpin for GroupEntry
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 more