Allow descriptor sets to be inherited even if the pipeline layout isn't exactly identical #1438
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.
Pull Request Template
Description
Vulkan only requires the pipeline layout used to bind descriptor sets to be compatible for the push constants and descriptor sets up to the one that's being bound. Descriptor sets after the one being bound don't make a difference. That means you can have nice things like shared descriptor sets in early slots that work with multiple pipelines with distinct layouts and don't need to rebind them.
Previously, the GraphicsPipelineConfigurator would only allow inherited state with an equivalent pipeline layout rather than just requiring it to match the subset that mattered. This makes it so descriptor sets can be inherited if their layout is compatible for that descriptor set.
Type of change
Please delete options that are not relevant.
It's a quasi-fix-feature-optimisation combo change. Someone might consider the previous overly strict requirements to be a bug, but it's not like there was documentation saying they did something else. It doesn't necessarily make anything faster unless applications are set up so that it can. Some might be, as the VSG's built-in PBR and Phong shadersets have compatible view descriptor sets, so something using both together and inheriting one will see it start working for the other, too.
How Has This Been Tested?
Mostly it's been tried with the not-yet-merged vsgincompatiblepipelinelayouts example as this work is a precursor to one of the potential fixes which we probably want to merge even if we don't go for that fix in the end.
Checklist: