Skip to content

Implement dynamic/mutable descriptor heaps.#172

Merged
crud89 merged 26 commits intomainfrom
dev/dynamic-descriptors
Oct 7, 2025
Merged

Implement dynamic/mutable descriptor heaps.#172
crud89 merged 26 commits intomainfrom
dev/dynamic-descriptors

Conversation

@crud89
Copy link
Copy Markdown
Owner

@crud89 crud89 commented Oct 7, 2025

Describe the pull request

This PR implements support for dynamic resource and sampler heaps. Dynamic means, that the descriptor set does not need to know the descriptor type in advance, but rather the type is decided upon binding a descriptor. Descriptors can be directly accessed using the shader model 6.6 ResourceDescriptorHeap and SamplerDescriptorHeap syntax.

Fundamentally, this works by creating a "proxy" descriptor set, that can accept resources of any type for binding by calling IDescriptorSet::bindToHeap. The method then returns the global heap index to the first bound descriptor, which can be passed to a shader in an arbitrary form, which then uses it to index into the heaps. Subsequent descriptors (if any) are indexed sequentially.

To use this feature, the device must be initialized with the GraphicsDeviceFeature::DynamicDescriptors feature. A working sample and tests are available for a more in-depth demonstration.

In the Vulkan backend, this is implemented using VK_EXT_mutable_descriptor_type. This is generally considered less efficient compared to statically specifying the descriptor type, so prefer the traditional approach if possible. However, using this feature might be more efficient if it reduces the number of pipeline state switches.

Related issues

@crud89 crud89 added this to the Alpha #05 milestone Oct 7, 2025
@crud89 crud89 self-assigned this Oct 7, 2025
@crud89 crud89 added Vulkan πŸŒ‹ The issue involves the Vulkan backend. DX12 ❎ The issue involves the DX12 backend. labels Oct 7, 2025
@crud89 crud89 added this to LiteFX Oct 7, 2025
@crud89 crud89 moved this to In Progress in LiteFX Oct 7, 2025
@crud89
Copy link
Copy Markdown
Owner Author

crud89 commented Oct 7, 2025

Run: checks

@crud89 crud89 merged commit fdd1eab into main Oct 7, 2025
9 checks passed
@crud89 crud89 deleted the dev/dynamic-descriptors branch October 7, 2025 18:58
@crud89 crud89 moved this from In Progress to v0.5.1 in LiteFX Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DX12 ❎ The issue involves the DX12 backend. Vulkan πŸŒ‹ The issue involves the Vulkan backend.

Projects

Status: v0.5.1

Development

Successfully merging this pull request may close these issues.

Add support for dynamic descriptor types and direct heap access.

1 participant