Struct vulkano::descriptor::descriptor::DescriptorDesc
source · pub struct DescriptorDesc {
pub ty: DescriptorDescTy,
pub array_count: u32,
pub stages: ShaderStages,
pub readonly: bool,
}
Expand description
Contains the exact description of a single descriptor.
Note: You are free to fill a
DescriptorDesc
struct the way you want, but its validity will be checked when you create a pipeline layout, a descriptor set, or when you try to bind a descriptor set.
Fields
ty: DescriptorDescTy
Describes the content and layout of each array element of a descriptor.
array_count: u32
How many array elements this descriptor is made of. The value 0 is invalid and may trigger a panic depending on the situation.
stages: ShaderStages
Which shader stages are going to access this descriptor.
readonly: bool
True if the attachment is only ever read by the shader. False if it is also written.
Implementations
sourceimpl DescriptorDesc
impl DescriptorDesc
sourcepub fn is_superset_of(
&self,
other: &DescriptorDesc
) -> Result<(), DescriptorDescSupersetError>
pub fn is_superset_of(
&self,
other: &DescriptorDesc
) -> Result<(), DescriptorDescSupersetError>
Checks whether we are a superset of another descriptor.
Returns true if self
is the same descriptor as other
, or if self
is the same as
other
but with a larger array elements count and/or more shader stages.
sourcepub fn union(&self, other: &DescriptorDesc) -> Option<DescriptorDesc>
pub fn union(&self, other: &DescriptorDesc) -> Option<DescriptorDesc>
Builds a DescriptorDesc
that is the union of self
and other
, if possible.
The returned value will be a superset of both self
and other
.
sourcepub fn pipeline_stages_and_access(&self) -> (PipelineStages, AccessFlagBits)
pub fn pipeline_stages_and_access(&self) -> (PipelineStages, AccessFlagBits)
Returns the pipeline stages and access flags corresponding to the usage of this descriptor.
Panic
Panics if the type is Sampler
.
Trait Implementations
sourceimpl Clone for DescriptorDesc
impl Clone for DescriptorDesc
sourcefn clone(&self) -> DescriptorDesc
fn clone(&self) -> DescriptorDesc
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more