Struct vulkano::shader::DescriptorBindingRequirements
source · pub struct DescriptorBindingRequirements {
pub descriptor_types: Vec<DescriptorType>,
pub descriptor_count: Option<u32>,
pub image_format: Option<Format>,
pub image_multisampled: bool,
pub image_scalar_type: Option<NumericType>,
pub image_view_type: Option<ImageViewType>,
pub stages: ShaderStages,
pub descriptors: HashMap<Option<u32>, DescriptorRequirements>,
}
Expand description
The requirements imposed by a shader on a binding within a descriptor set layout, and on any resource that is bound to that binding.
Fields§
§descriptor_types: Vec<DescriptorType>
The descriptor types that are allowed.
descriptor_count: Option<u32>
The number of descriptors (array elements) that the shader requires. The descriptor set layout can declare more than this, but never less.
None
means that the shader declares this as a runtime-sized array, and could potentially
access every array element provided in the descriptor set.
image_format: Option<Format>
The image format that is required for image views bound to this binding. If this is
None
, then any image format is allowed.
image_multisampled: bool
Whether image views bound to this binding must have multisampling enabled or disabled.
image_scalar_type: Option<NumericType>
The base scalar type required for the format of image views bound to this binding.
This is None
for non-image bindings.
image_view_type: Option<ImageViewType>
The view type that is required for image views bound to this binding.
This is None
for non-image bindings.
stages: ShaderStages
The shader stages that the binding must be declared for.
descriptors: HashMap<Option<u32>, DescriptorRequirements>
The requirements for individual descriptors within a binding.
Keys with Some
hold requirements for a specific descriptor index, if it is statically
known in the shader (a constant). The key None
holds requirements for indices that are
not statically known, but determined only at runtime (calculated from an input variable).
Implementations§
Trait Implementations§
source§impl Clone for DescriptorBindingRequirements
impl Clone for DescriptorBindingRequirements
source§fn clone(&self) -> DescriptorBindingRequirements
fn clone(&self) -> DescriptorBindingRequirements
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more