Merge single layout descriptor set pools into StandardDescriptorSetAllocator
#2067
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.
SingleLayoutDescriptorSetPool
,SingleLayoutVeriableDescriptorSetPool
andStandardDescriptorSetAllocator
were all doing almost the same thing, which resulted in there being 3 types of descriptor set allocations and descriptor sets as well, all in all I think it wasn't very clean which is what lead me to merge them into one.While I was on it I also did some micro-optimizations, namely removing a
HashMap<Arc<DescriptorSetLayout>, ...>>
and replacing it with a sorted map using the IDs introduced in #2054, which resulted in the overhead of usingStandardDescriptorSetAllocator
overSingleLayoutDescriptorSetPool
directly for example just barely being measurable any more. It's around 2 to 3 nanoseconds on my machine. Therefore, there is no incentive to keep the pools separate for those reasons either.Also added some more utility functions for garbage collection to
StandardDescriptorSetAllocator
.Changelog: