Allow mixed descriptor sets containing samplers and resources.#170
Merged
Allow mixed descriptor sets containing samplers and resources.#170
Conversation
β¦ in the DirectX 12 backend.
β¦ static resources.
β¦e descriptor heap in the Vulkan backend.
Owner
Author
|
Run: checks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the pull request
This PR overhauls the binding of descriptor sets containing both, samplers and resources. This was partially supported previously, but only for the DirectX 12 backend, where it too only worked under certain circumstances, due to root parameter indices not being properly mapped across multiple descriptor tables for a single descriptor set. #163 thus temporarily removed support entirely by throwing an exception during pipeline creation, if such a scenario was encountered. This PR now addresses those issues and implements proper support for such a use case.
For the Vulkan backend, this resulted in a refactoring of the descriptor buffer implementation, as descriptor sets must be fully bound to a descriptor buffer. This is different to D3D12, where a descriptor set can (and must) be split over two descriptor heaps (for samplers and resources), which is not possible in Vulkan. Fortunately, GPUinfo reports equal memory requirements for samplerDescriptorBufferAddressSpaceSize/resourceDescriptorBufferAddressSpaceSize and descriptorBufferAddressSpaceSize over all devices that support
VK_EXT_descriptor_buffer, so we can easily combine sampler and resource heaps into a single heap that binds all resource types.Related issues
ResourceDescriptorHeapandSamplerDescriptorHeapare used in a shader.