Skip to content

LiteFX::Rendering::GraphicsDeviceFeatures::DynamicDescriptors

Enables or disables support for dynamic descriptor types (SM 6.6 dynamic resources and VK_EXT_mutable_descriptor_type).

Synopsis

Declared in <litefx/rendering_api.hpp>

bool DynamicDescriptors = { false };

Description

Note that support for this feature is limited in the engine. It's purpose is to bind resources of different DescriptorType "DescriptorTypes" within a single descriptor array. However, you still have to allocate a IDescriptorSet to be able to bind resources and retrieve resource indices by calling IDescriptorSet::bindToHeap.

If you are only using the DirectX 12 backend, you can generally index any bound resource this way. However, in the Vulkan backend, only resources within the descriptor set can be indexed. Descriptor sets that contain descriptors of DescriptorType::ResourceDescriptorHeap or DescriptorType::SamplerDescriptorHeap can be used to bind those descriptors. Such descriptor sets are called proxy sets, because they do not actually occur in the shader. Instead they are directly accessed using the ResourceDescriptorHeap or SamplerDescriptorHeap syntax. In order to acquire a resource from those heaps, you need to provide the index, that can be retrieved as described above.

Be aware that dynamic descriptors (aka mutable descriptors) are considered inefficient in Vulkan. You should not use them, if you could instead use multiple descriptor sets containing unbounded descriptor arrays. They can, however, be more efficient if you can replace multiple pipeline layouts with a single one that relies on mutable type descriptors.