#[non_exhaustive]
#[repr(i32)]
pub enum DescriptorType {
Show 13 variants Sampler = 0, CombinedImageSampler = 1, SampledImage = 2, StorageImage = 3, UniformTexelBuffer = 4, StorageTexelBuffer = 5, UniformBuffer = 6, StorageBuffer = 7, UniformBufferDynamic = 8, StorageBufferDynamic = 9, InputAttachment = 10, InlineUniformBlock = 1_000_138_000, AccelerationStructure = 1_000_150_000,
}
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 = 0

Describes how a SampledImage descriptor should be read.

§

CombinedImageSampler = 1

Combines SampledImage and Sampler in one descriptor.

§

SampledImage = 2

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

§

StorageImage = 3

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 = 4

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

§

StorageTexelBuffer = 5

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 = 6

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

§

StorageBuffer = 7

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 = 8

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 = 9

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 = 10

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.

§

InlineUniformBlock = 1_000_138_000

Very similar to UniformBuffer, but the data is written directly into an inline buffer inside the descriptor set, instead of writing a reference to a buffer. This is similar to push constants, but because the data is stored in the descriptor set rather than the command buffer, it can be bound multiple times and reused, and you can have more than one of them bound in a single shader.

It is not possible to have an arrayed binding of inline uniform blocks; at most one inline uniform block can be bound to one binding.

Within a shader, an inline uniform block is defined exactly the same as a uniform buffer. The Vulkan API acts as if every byte in the inline buffer were its own descriptor:

  • The descriptor_count value specifies the number of bytes available for data.
  • The variable_descriptor_count value when allocating a descriptor set specifies a variable byte count instead.
  • The first_array_element value when writing a descriptor set specifies the byte offset into the inline buffer. These values must always be a multiple of 4.
§

AccelerationStructure = 1_000_150_000

Gives read access to an acceleration structure, for performing ray queries and ray tracing.

Trait Implementations§

source§

impl Clone for DescriptorType

source§

fn clone(&self) -> DescriptorType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DescriptorType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<DescriptorType> for DescriptorType

source§

fn from(val: DescriptorType) -> Self

Converts to this type from the input type.
source§

impl Hash for DescriptorType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for DescriptorType

source§

fn eq(&self, other: &DescriptorType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<DescriptorType> for DescriptorType

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(val: DescriptorType) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for DescriptorType

source§

impl Eq for DescriptorType

source§

impl StructuralEq for DescriptorType

source§

impl StructuralPartialEq for DescriptorType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.