Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce number of unused pipeline bindings reserved for argument buffers. #2417

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

squidbus
Copy link
Contributor

@squidbus squidbus commented Jan 6, 2025

  • Checks if any descriptor set layouts bound to a pipeline layout are actually using argument buffers before reserving any indices to bind them.
  • Reduces the number of reserved indices for argument buffers to only the number of descriptor sets.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant