logo
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

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 a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.