logo
#[non_exhaustive]
#[repr(i32)]
pub enum DescriptorType {
    Sampler,
    CombinedImageSampler,
    SampledImage,
    StorageImage,
    UniformTexelBuffer,
    StorageTexelBuffer,
    UniformBuffer,
    StorageBuffer,
    UniformBufferDynamic,
    StorageBufferDynamic,
    InputAttachment,
}
Expand description

Describes what kind of resource may later be bound to a descriptor.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Sampler

Describes how a SampledImage descriptor should be read.

CombinedImageSampler

Combines SampledImage and Sampler in one descriptor.

SampledImage

Gives read-only access to an image via a sampler. The image must be combined with a sampler inside the shader.

StorageImage

Gives read and/or write access to individual pixels in an image. The image cannot be sampled, so you have exactly specify which pixel to read or write.

UniformTexelBuffer

Gives read-only access to the content of a buffer, interpreted as an array of texel data.

StorageTexelBuffer

Gives read and/or write access to the content of a buffer, interpreted as an array of texel data. Less restrictive but sometimes slower than a uniform texel buffer.

UniformBuffer

Gives read-only access to the content of a buffer, interpreted as a structure.

StorageBuffer

Gives read and/or write access to the content of a buffer, interpreted as a structure. Less restrictive but sometimes slower than a uniform buffer.

UniformBufferDynamic

As UniformBuffer, but the offset within the buffer is specified at the time the descriptor set is bound, rather than when the descriptor set is updated.

StorageBufferDynamic

As StorageBuffer, but the offset within the buffer is specified at the time the descriptor set is bound, rather than when the descriptor set is updated.

InputAttachment

Gives access to an image inside a fragment shader via a render pass. You can only access the pixel that is currently being processed by the fragment shader.

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
Converts to this type from the input type.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type returned in the event of a conversion error.
Performs the conversion.

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.