Struct vulkano::descriptor_set::layout::DescriptorDesc [−][src]
pub struct DescriptorDesc {
pub ty: DescriptorType,
pub descriptor_count: u32,
pub variable_count: bool,
pub stages: ShaderStages,
pub immutable_samplers: Vec<Arc<Sampler>>,
}
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: DescriptorType
Describes the content and layout of each array element of a descriptor.
descriptor_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.
variable_count: bool
True if the descriptor has a variable descriptor count. The value of descriptor_count
is taken as the maximum number of descriptors allowed. There may only be one binding with a
variable count in a descriptor set, and it must be the last binding.
stages: ShaderStages
Which shader stages are going to access this descriptor.
immutable_samplers: Vec<Arc<Sampler>>
Samplers that are included as a fixed part of the descriptor set layout. Once bound, they do not need to be provided when creating a descriptor set.
The list must be either empty, or contain exactly descriptor_count
samplers. It must be
empty if ty
is something other than Sampler
or CombinedImageSampler
.
Implementations
pub fn ensure_compatible_with_shader(
&self,
descriptor_requirements: &DescriptorRequirements
) -> Result<(), DescriptorRequirementsNotMet>
pub fn ensure_compatible_with_shader(
&self,
descriptor_requirements: &DescriptorRequirements
) -> Result<(), DescriptorRequirementsNotMet>
Checks whether the descriptor of a pipeline layout self
is compatible with the descriptor
of a shader other
.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for DescriptorDesc
impl Send for DescriptorDesc
impl Sync for DescriptorDesc
impl Unpin for DescriptorDesc
impl UnwindSafe for DescriptorDesc
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.