Module vulkano::descriptor::descriptor[][src]

Description of a single descriptor.

This module contains traits and structs related to describing a single descriptor. A descriptor is a slot where you can bind a buffer or an image so that it can be accessed from your shaders. In order to specify which buffer or image to bind to a descriptor, see the descriptor_set module.

There are four different kinds of descriptors that give access to buffers:

  • Uniform texel buffers. Gives read-only access to the content of a buffer. Only supports certain buffer formats.
  • Storage texel buffers. Gives read and/or write access to the content of a buffer. Only supports certain buffer formats. Less restrictive but sometimes slower than uniform texel buffers.
  • Uniform buffers. Gives read-only access to the content of a buffer. Less restrictive but sometimes slower than uniform texel buffers.
  • Storage buffers. Gives read and/or write access to the content of a buffer. Less restrictive but sometimes slower than uniform buffers and storage texel buffers.

There are five different kinds of descriptors related to images:

  • Storage images. Gives read and/or write access to individual pixels in an image. The image cannot be sampled. In other words, you have exactly specify which pixel to read or write.
  • Sampled images. Gives read-only access to an image. Before you can use a sampled image in a a shader, you have to combine it with a sampler (see below). The sampler describes how reading the image will behave.
  • Samplers. Doesn’t contain an image but a sampler object that describes how an image will be accessed. This is meant to be combined with a sampled image (see above).
  • Combined image and sampler. Similar to a sampled image, but also directly includes the sampler which indicates how the sampling is done.
  • Input attachments. The fastest but also most restrictive access to images. Must be integrated in a render pass. Can only give access to the same pixel as the one you’re processing.

Structs

DescriptorBufferDesc

Additional description for descriptors that contain buffers.

DescriptorDesc

Contains the exact description of a single descriptor.

DescriptorImageDesc

Additional description for descriptors that contain images.

ShaderStages

Describes which shader stages have access to a descriptor.

Enums

DescriptorDescSupersetError

Error when checking whether a descriptor is a superset of another one.

DescriptorDescTy

Describes the content and layout of each array element of a descriptor.

DescriptorImageDescArray
DescriptorImageDescDimensions
DescriptorType

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

ShaderStagesSupersetError

Error when checking whether some shader stages are superset of others.