pub enum GlobalVarShape {
Handles {
handle: Handle,
fixed_count: Option<NonZeroU32>,
},
UntypedData(MemLayout),
TypedInterface(Type),
}
Expand description
GlobalVar
s are currently used for both chunks of plain data (i.e. memory),
and the “shader interface” (inherited by Shader
SPIR-V from GLSL, whereas
Kernel
SPIR-V ended up with OpenCL
’s “resources are passed to entry-points
as regular function arguments”, with BuiltIn
+Input
as a sole exception).
Variants§
Handles
One or more (i.e. optionally arrayed) “abstract resource” Handle
s
(see Handle
documentation for more on what it can represent).
The single handle case is equivalent to a length 1
array of handles,
and as such is represented by having fixed_count
be Some(1)
.
UntypedData(MemLayout)
TypedInterface(Type)
Non-memory pipeline interface, which must keep the exact original type, even if that type is concrete and could be handled just like memory.
Typically Input
or Output
, but extensions (e.g. ray-tracing) may add
more such interface storage classes with strict type requirements.
Trait Implementations§
source§impl Clone for GlobalVarShape
impl Clone for GlobalVarShape
source§fn clone(&self) -> GlobalVarShape
fn clone(&self) -> GlobalVarShape
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl PartialEq for GlobalVarShape
impl PartialEq for GlobalVarShape
impl Copy for GlobalVarShape
impl Eq for GlobalVarShape
impl StructuralPartialEq for GlobalVarShape
Auto Trait Implementations§
impl Freeze for GlobalVarShape
impl RefUnwindSafe for GlobalVarShape
impl Send for GlobalVarShape
impl Sync for GlobalVarShape
impl Unpin for GlobalVarShape
impl UnwindSafe for GlobalVarShape
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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