pub struct ShaderStage { /* private fields */ }
Expand description
Describes the shader stages that a binding will be visible from.
These can be combined so something that is visible from both vertex and fragment shaders can be defined as:
ShaderStage::VERTEX | ShaderStage::FRAGMENT
Implementations§
Source§impl ShaderStage
impl ShaderStage
Sourcepub const NONE: ShaderStage
pub const NONE: ShaderStage
Binding is not visible from any shader stage
Sourcepub const VERTEX: ShaderStage
pub const VERTEX: ShaderStage
Binding is visible from the vertex shader of a render pipeline
Sourcepub const FRAGMENT: ShaderStage
pub const FRAGMENT: ShaderStage
Binding is visible from the fragment shader of a render pipeline
Sourcepub const COMPUTE: ShaderStage
pub const COMPUTE: ShaderStage
Binding is visible from the compute shader of a compute pipeline
Sourcepub const fn empty() -> ShaderStage
pub const fn empty() -> ShaderStage
Returns an empty set of flags
Sourcepub const fn all() -> ShaderStage
pub const fn all() -> ShaderStage
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<ShaderStage>
pub fn from_bits(bits: u32) -> Option<ShaderStage>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> ShaderStage
pub const fn from_bits_truncate(bits: u32) -> ShaderStage
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> ShaderStage
pub const unsafe fn from_bits_unchecked(bits: u32) -> ShaderStage
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: ShaderStage) -> bool
pub const fn intersects(&self, other: ShaderStage) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: ShaderStage) -> bool
pub const fn contains(&self, other: ShaderStage) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: ShaderStage)
pub fn insert(&mut self, other: ShaderStage)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: ShaderStage)
pub fn remove(&mut self, other: ShaderStage)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: ShaderStage)
pub fn toggle(&mut self, other: ShaderStage)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: ShaderStage, value: bool)
pub fn set(&mut self, other: ShaderStage, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for ShaderStage
impl Binary for ShaderStage
Source§impl BitAnd for ShaderStage
impl BitAnd for ShaderStage
Source§fn bitand(self, other: ShaderStage) -> ShaderStage
fn bitand(self, other: ShaderStage) -> ShaderStage
Returns the intersection between the two sets of flags.
Source§type Output = ShaderStage
type Output = ShaderStage
&
operator.Source§impl BitAndAssign for ShaderStage
impl BitAndAssign for ShaderStage
Source§fn bitand_assign(&mut self, other: ShaderStage)
fn bitand_assign(&mut self, other: ShaderStage)
Disables all flags disabled in the set.
Source§impl BitOr for ShaderStage
impl BitOr for ShaderStage
Source§fn bitor(self, other: ShaderStage) -> ShaderStage
fn bitor(self, other: ShaderStage) -> ShaderStage
Returns the union of the two sets of flags.
Source§type Output = ShaderStage
type Output = ShaderStage
|
operator.Source§impl BitOrAssign for ShaderStage
impl BitOrAssign for ShaderStage
Source§fn bitor_assign(&mut self, other: ShaderStage)
fn bitor_assign(&mut self, other: ShaderStage)
Adds the set of flags.
Source§impl BitXor for ShaderStage
impl BitXor for ShaderStage
Source§fn bitxor(self, other: ShaderStage) -> ShaderStage
fn bitxor(self, other: ShaderStage) -> ShaderStage
Returns the left flags, but with all the right flags toggled.
Source§type Output = ShaderStage
type Output = ShaderStage
^
operator.Source§impl BitXorAssign for ShaderStage
impl BitXorAssign for ShaderStage
Source§fn bitxor_assign(&mut self, other: ShaderStage)
fn bitxor_assign(&mut self, other: ShaderStage)
Toggles the set of flags.
Source§impl Clone for ShaderStage
impl Clone for ShaderStage
Source§fn clone(&self) -> ShaderStage
fn clone(&self) -> ShaderStage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ShaderStage
impl Debug for ShaderStage
Source§impl<'de> Deserialize<'de> for ShaderStage
impl<'de> Deserialize<'de> for ShaderStage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShaderStage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShaderStage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Extend<ShaderStage> for ShaderStage
impl Extend<ShaderStage> for ShaderStage
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ShaderStage>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ShaderStage>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<ShaderStage> for ShaderStage
impl FromIterator<ShaderStage> for ShaderStage
Source§fn from_iter<T>(iterator: T) -> ShaderStagewhere
T: IntoIterator<Item = ShaderStage>,
fn from_iter<T>(iterator: T) -> ShaderStagewhere
T: IntoIterator<Item = ShaderStage>,
Source§impl Hash for ShaderStage
impl Hash for ShaderStage
Source§impl LowerHex for ShaderStage
impl LowerHex for ShaderStage
Source§impl Not for ShaderStage
impl Not for ShaderStage
Source§fn not(self) -> ShaderStage
fn not(self) -> ShaderStage
Returns the complement of this set of flags.
Source§type Output = ShaderStage
type Output = ShaderStage
!
operator.Source§impl Octal for ShaderStage
impl Octal for ShaderStage
Source§impl Ord for ShaderStage
impl Ord for ShaderStage
Source§fn cmp(&self, other: &ShaderStage) -> Ordering
fn cmp(&self, other: &ShaderStage) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ShaderStage
impl PartialEq for ShaderStage
Source§impl PartialOrd for ShaderStage
impl PartialOrd for ShaderStage
Source§impl Serialize for ShaderStage
impl Serialize for ShaderStage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl Sub for ShaderStage
impl Sub for ShaderStage
Source§fn sub(self, other: ShaderStage) -> ShaderStage
fn sub(self, other: ShaderStage) -> ShaderStage
Returns the set difference of the two sets of flags.
Source§type Output = ShaderStage
type Output = ShaderStage
-
operator.Source§impl SubAssign for ShaderStage
impl SubAssign for ShaderStage
Source§fn sub_assign(&mut self, other: ShaderStage)
fn sub_assign(&mut self, other: ShaderStage)
Disables all flags enabled in the set.