Struct vulkano::descriptor_set::layout::DescriptorBindingFlags
source · pub struct DescriptorBindingFlags(/* private fields */);
Expand description
Flags that control how a binding in a descriptor set layout is created.
Implementations§
source§impl DescriptorBindingFlags
impl DescriptorBindingFlags
sourcepub const UPDATE_AFTER_BIND: Self = _
pub const UPDATE_AFTER_BIND: Self = _
Allows descriptors in this binding to be updated after a command buffer has already recorded a bind command containing a descriptor set with this layout, as long as the command buffer is not executing. Each descriptor can also be updated concurrently.
If a binding has this flag, then the descriptor set layout must be created with the
DescriptorSetLayoutCreateFlags::UPDATE_AFTER_BIND_POOL
flag, and descriptor sets using
it must be allocated from a descriptor pool that has the
DescriptorPoolCreateFlags::UPDATE_AFTER_BIND
flag.
In addition, the descriptor_binding_*_update_after_bind
feature corresponding to the
descriptor type of the binding must be enabled.
sourcepub const UPDATE_UNUSED_WHILE_PENDING: Self = _
pub const UPDATE_UNUSED_WHILE_PENDING: Self = _
Allows descriptors in this binding to be updated after a command buffer has already recorded a bind command containing a descriptor set with this layout, as long as the command buffer is not executing, and no shader invocation recorded in the command buffer uses the descriptor. Each descriptor can also be updated concurrently.
This is a subset of what is allowed by DescriptorBindingFlags::UPDATE_AFTER_BIND
, but
has much less strict requirements. It does not require any additional flags to be present
on the descriptor set layout or the descriptor pool, and instead requires the
descriptor_binding_update_unused_while_pending
feature.
What counts as “used” depends on whether the DescriptorBindingFlags::PARTIALLY_BOUND
flag is also set. If it is set, then only dynamic use by a shader invocation counts as
being used, otherwise all static use by a shader invocation is considered used.
sourcepub const PARTIALLY_BOUND: Self = _
pub const PARTIALLY_BOUND: Self = _
Allows descriptors to be left empty or invalid even if they are statically used by a
shader invocation, as long as they are not dynamically used . Additionally, if
DescriptorBindingFlags::UPDATE_UNUSED_WHILE_PENDING
is set, allows updating descriptors
if they are statically used by a command buffer they are recorded in, as long as are not
dynamically used.
The descriptor_binding_partially_bound
feature must be enabled on the device.
sourcepub const VARIABLE_DESCRIPTOR_COUNT: Self = _
pub const VARIABLE_DESCRIPTOR_COUNT: Self = _
Whether the binding has a variable number of descriptors.
If set, the descriptor_binding_variable_descriptor_count
feature must be
enabled. The value of descriptor_count
specifies the maximum number of descriptors
allowed.
There may only be one binding with a variable count in a descriptor set, and it must be the
binding with the highest binding number. The descriptor_type
must not be
DescriptorType::UniformBufferDynamic
or DescriptorType::StorageBufferDynamic
.
sourcepub const fn none() -> Self
👎Deprecated since 0.31.0: use empty
instead
pub const fn none() -> Self
empty
insteadReturns a DescriptorBindingFlags
with none of the flags set.
sourcepub const fn intersects(self, other: Self) -> bool
pub const fn intersects(self, other: Self) -> bool
Returns whether any flags are set in both self
and other
.
sourcepub const fn contains(self, other: Self) -> bool
pub const fn contains(self, other: Self) -> bool
Returns whether all flags in other
are set in self
.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection of self
and other
.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns self
without the flags set in other
.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the flags that are set in self
or other
, but not in both.
Trait Implementations§
source§impl BitAnd for DescriptorBindingFlags
impl BitAnd for DescriptorBindingFlags
source§impl BitAndAssign for DescriptorBindingFlags
impl BitAndAssign for DescriptorBindingFlags
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&=
operation. Read moresource§impl BitOr for DescriptorBindingFlags
impl BitOr for DescriptorBindingFlags
source§impl BitOrAssign for DescriptorBindingFlags
impl BitOrAssign for DescriptorBindingFlags
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moresource§impl BitXor for DescriptorBindingFlags
impl BitXor for DescriptorBindingFlags
source§impl BitXorAssign for DescriptorBindingFlags
impl BitXorAssign for DescriptorBindingFlags
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^=
operation. Read moresource§impl Clone for DescriptorBindingFlags
impl Clone for DescriptorBindingFlags
source§fn clone(&self) -> DescriptorBindingFlags
fn clone(&self) -> DescriptorBindingFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DescriptorBindingFlags
impl Debug for DescriptorBindingFlags
source§impl Default for DescriptorBindingFlags
impl Default for DescriptorBindingFlags
source§impl From<DescriptorBindingFlags> for DescriptorBindingFlags
impl From<DescriptorBindingFlags> for DescriptorBindingFlags
source§fn from(val: DescriptorBindingFlags) -> Self
fn from(val: DescriptorBindingFlags) -> Self
source§impl From<DescriptorBindingFlags> for DescriptorBindingFlags
impl From<DescriptorBindingFlags> for DescriptorBindingFlags
source§fn from(val: DescriptorBindingFlags) -> Self
fn from(val: DescriptorBindingFlags) -> Self
source§impl Hash for DescriptorBindingFlags
impl Hash for DescriptorBindingFlags
source§impl PartialEq for DescriptorBindingFlags
impl PartialEq for DescriptorBindingFlags
source§fn eq(&self, other: &DescriptorBindingFlags) -> bool
fn eq(&self, other: &DescriptorBindingFlags) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Sub for DescriptorBindingFlags
impl Sub for DescriptorBindingFlags
source§impl SubAssign for DescriptorBindingFlags
impl SubAssign for DescriptorBindingFlags
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-=
operation. Read more