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

Checks whether the descriptor of a pipeline layout self is compatible with the descriptor of a shader other.

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

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

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

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.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.