Reduce number of unused pipeline bindings reserved for argument buffers. #2417
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.
I was hitting limits on number of bind indices available because a fixed 8 are always reserved for argument buffers, even with only a single descriptor set using push descriptors (which do not use argument buffers). Mainly when tessellation is involved, it was unable to reserve indices for the output buffer.
Please let me know if there's anything I'm missing with this approach, I tested it in my application both as-is and with push descriptors disabled, and it seems to work fine.
Side note: It may be worth modifying the
maxPushDescriptors
property based on the number of potential reserved bindings needed, as it's what I use to determine whether to use push descriptors or not for a pipeline descriptor set layout. Advertising with the max possible number when in reality some may be taken away for argument buffers and other internal bindings can cause problems that could be avoided if the application knew to avoid using as many push descriptors. But I didn't delve into that in this PR.