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: FnvHashSet<u32>,
pub sampler_no_unnormalized_coordinates: FnvHashSet<u32>,
pub sampler_no_ycbcr_conversion: FnvHashSet<u32>,
pub sampler_with_images: FnvHashMap<u32, FnvHashSet<DescriptorIdentifier>>,
pub stages: ShaderStages,
pub storage_image_atomic: FnvHashSet<u32>,
pub storage_read: FnvHashSet<u32>,
pub storage_write: FnvHashSet<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: FnvHashSet<u32>
For sampler bindings, the descriptor indices that require a depth comparison sampler.
sampler_no_unnormalized_coordinates: FnvHashSet<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: FnvHashSet<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: FnvHashMap<u32, FnvHashSet<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: FnvHashSet<u32>
For storage image bindings, the descriptor indices that atomic operations are used with.
storage_read: FnvHashSet<u32>
For storage images and storage texel buffers, the descriptor indices that perform read operations on the bound resource.
storage_write: FnvHashSet<u32>
For storage buffers, storage images and storage texel buffers, the descriptor indices that perform write operations on the bound resource.
Implementations
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
Returns the “default value” for a type. Read more
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
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.