Enum spirt::qptr::shapes::GlobalVarShape
source · 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<GlobalVarShape> for GlobalVarShape
impl PartialEq<GlobalVarShape> for GlobalVarShape
source§fn eq(&self, other: &GlobalVarShape) -> bool
fn eq(&self, other: &GlobalVarShape) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for GlobalVarShape
impl Eq for GlobalVarShape
impl StructuralEq for GlobalVarShape
impl StructuralPartialEq for GlobalVarShape
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.