Merged
Conversation
Empty sets are automatically generated if there is a gap in between layout spaces.
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 slightly reworks descriptor set layouts and their allocation. First of all, it is now more easy to allocate descriptor sets without providing a resource to bind to it directly. The resource in this case needs to be bound before using the descriptor set later:
This is enabled by a
std::monostateoverload for the descriptor binding resource container, which together with the binding now being optional allows for default-constructableDescriptorBindings. This second change to thebindingproperty allows to use pre-ordered indices for register bindings:Note that a single
DescriptorBindingrefers to one descriptor within a descriptor set. ForallocateMultiplethis means that counting descriptor indices is reset for each element of the outer collection.Additionally, t is now valid for the Vulkan backend to define empty descriptor sets. Earlier this would have resulted in validation errors and failures when attempting to bind the descriptor set. When creating a pipeline layout, empty descriptor sets are created for spaces that have no layout associated with them (up until the layout with the highest space index). The following shader can now be used for both backends:
The space indices are now validate for both backends. Within one pipeline each descriptor set layout must use distinct spaces. If two layouts share the same space, an error will be raised when attempting to create the pipeline layout.
Related issues