Expand description

Descriptor sets creation and management

This module is dedicated to managing descriptor sets. There are three concepts in Vulkan related to descriptor sets:

  • A DescriptorSetLayout is a Vulkan object that describes to the Vulkan implementation the layout of a future descriptor set. When you allocate a descriptor set, you have to pass an instance of this object. This is represented with the UnsafeDescriptorSetLayout type in vulkano.
  • A DescriptorPool is a Vulkan object that holds the memory of descriptor sets and that can be used to allocate and free individual descriptor sets. This is represented with the UnsafeDescriptorPool type in vulkano.
  • A DescriptorSet contains the bindings to resources and is allocated from a pool. This is represented with the UnsafeDescriptorSet type in vulkano.

In addition to this, vulkano defines the following:

  • The DescriptorPool trait can be implemented on types from which you can allocate and free descriptor sets. However it is different from Vulkan descriptor pools in the sense that an implementation of the DescriptorPool trait can manage multiple Vulkan descriptor pools.
  • The StdDescriptorPool type is a default implementation of the DescriptorPool trait.
  • The DescriptorSet trait is implemented on types that wrap around Vulkan descriptor sets in a safe way. A Vulkan descriptor set is inherently unsafe, so we need safe wrappers around them.
  • The SimpleDescriptorSet type is a default implementation of the DescriptorSet trait.
  • The DescriptorSetsCollection trait is implemented on collections of types that implement DescriptorSet. It is what you pass to the draw functions.

Re-exports

pub use self::collection::DescriptorSetsCollection;

Modules

Structs

Represents a single write entry to a descriptor set.
Number of available descriptors slots in a pool.
A descriptor set created from a FixedSizeDescriptorSetsPool.
Prototype of a FixedSizeDescriptorSet.
Same as FixedSizeDescriptorSetBuilder, but we’re in an array.
Pool of descriptor sets of a specific capacity and that are automatically reclaimed.
An immutable descriptor set that is expected to be long-lived.
Internal object related to the PersistentDescriptorSet system.
Internal object related to the PersistentDescriptorSet system.
Prototype of a PersistentDescriptorSet.
Same as PersistentDescriptorSetBuilder, but we’re in an array.
Internal object related to the PersistentDescriptorSet system.
Internal object related to the PersistentDescriptorSet system.
Standard implementation of a descriptor pool.
A descriptor set allocated from a StdDescriptorPool.
Pool from which descriptor sets are allocated from.
Iterator to the descriptor sets allocated from an unsafe descriptor pool.
Low-level descriptor set.
Describes to the Vulkan implementation the layout of all descriptors within a descriptor set.

Enums

Error that can be returned when creating a device.
Error when building a persistent descriptor set.
Error related to the persistent descriptor set.

Traits

A pool from which descriptor sets can be allocated.
An allocated descriptor set.
Trait for objects that contain a collection of resources that will be accessible by shaders.
Trait for objects that describe the layout of the descriptors of a set.