Struct vulkano::shader::DescriptorRequirements
source · [−]pub struct DescriptorRequirements {Show 14 fields
pub descriptor_types: Vec<DescriptorType>,
pub descriptor_count: u32,
pub image_format: Option<Format>,
pub image_multisampled: bool,
pub image_scalar_type: Option<ShaderScalarType>,
pub image_view_type: Option<ImageViewType>,
pub sampler_compare: HashSet<u32>,
pub sampler_no_unnormalized_coordinates: HashSet<u32>,
pub sampler_no_ycbcr_conversion: HashSet<u32>,
pub sampler_with_images: HashMap<u32, HashSet<DescriptorIdentifier>>,
pub stages: ShaderStages,
pub storage_image_atomic: HashSet<u32>,
pub storage_read: HashSet<u32>,
pub storage_write: HashSet<u32>,
}
Expand description
The requirements imposed by a shader on a descriptor within a descriptor set layout, and on any resource that is bound to that descriptor.
Fields
descriptor_types: Vec<DescriptorType>
The descriptor types that are allowed.
descriptor_count: u32
The number of descriptors (array elements) that the shader requires. The descriptor set layout can declare more than this, but never less.
image_format: Option<Format>
The image format that is required for image views bound to this descriptor. If this is
None
, then any image format is allowed.
image_multisampled: bool
Whether image views bound to this descriptor must have multisampling enabled or disabled.
image_scalar_type: Option<ShaderScalarType>
The base scalar type required for the format of image views bound to this descriptor.
This is None
for non-image descriptors.
image_view_type: Option<ImageViewType>
The view type that is required for image views bound to this descriptor.
This is None
for non-image descriptors.
sampler_compare: HashSet<u32>
For sampler bindings, the descriptor indices that require a depth comparison sampler.
sampler_no_unnormalized_coordinates: HashSet<u32>
For sampler bindings, the descriptor indices that perform sampling operations that are not
permitted with unnormalized coordinates. This includes sampling with ImplicitLod
,
Dref
or Proj
SPIR-V instructions or with an LOD bias or offset.
sampler_no_ycbcr_conversion: HashSet<u32>
For sampler bindings, the descriptor indices that perform sampling operations that are not
permitted with a sampler YCbCr conversion. This includes sampling with Gather
SPIR-V
instructions or with an offset.
sampler_with_images: HashMap<u32, HashSet<DescriptorIdentifier>>
For sampler bindings, the sampled image descriptors that are used in combination with each sampler descriptor index.
stages: ShaderStages
The shader stages that the descriptor must be declared for.
storage_image_atomic: HashSet<u32>
For storage image bindings, the descriptor indices that atomic operations are used with.
storage_read: HashSet<u32>
For storage images and storage texel buffers, the descriptor indices that perform read operations on the bound resource.
storage_write: HashSet<u32>
For storage buffers, storage images and storage texel buffers, the descriptor indices that perform write operations on the bound resource.
Implementations
sourceimpl DescriptorRequirements
impl DescriptorRequirements
sourcepub fn intersection(
&self,
other: &Self
) -> Result<Self, DescriptorRequirementsIncompatible>
pub fn intersection(
&self,
other: &Self
) -> Result<Self, DescriptorRequirementsIncompatible>
Produces the intersection of two descriptor requirements, so that the requirements of both are satisfied. An error is returned if the requirements conflict.
Trait Implementations
sourceimpl Clone for DescriptorRequirements
impl Clone for DescriptorRequirements
sourcefn clone(&self) -> DescriptorRequirements
fn clone(&self) -> DescriptorRequirements
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DescriptorRequirements
impl Debug for DescriptorRequirements
sourceimpl Default for DescriptorRequirements
impl Default for DescriptorRequirements
sourcefn default() -> DescriptorRequirements
fn default() -> DescriptorRequirements
Returns the “default value” for a type. Read more
sourceimpl From<&'_ DescriptorRequirements> for DescriptorSetLayoutBinding
impl From<&'_ DescriptorRequirements> for DescriptorSetLayoutBinding
sourcefn from(reqs: &DescriptorRequirements) -> Self
fn from(reqs: &DescriptorRequirements) -> Self
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for DescriptorRequirements
impl Send for DescriptorRequirements
impl Sync for DescriptorRequirements
impl Unpin for DescriptorRequirements
impl UnwindSafe for DescriptorRequirements
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more