Environment:
- OS: macOS
- GPU and driver version: KosmicKrisp ToT
- SDK or header version if building from repo:
- Options enabled (synchronization, best practices, etc.):
Describe the Issue
As the title describes, NegativePipelineLayout.ExcessPerStageDescriptors creates VkDescriptorSetLayouts with a descriptorCount bigger than what the driver allows. This leads to a crash in the driver due to how we handle dynamic uniform buffers (we have a bit set to know the locations and because descriptorCount is bigger than our allowed 32, we end up overwriting memory outside of this bit set). While this is technically legal Vulkan, there are VUID-VkPipelineLayoutCreateInfo-descriptorType-03017 and similar ones that avoid creating pipeline layouts with a descriptor count greater than the one allowed by the driver. This looks like an oversight to me since there is no reason to support descriptor set layouts with a greater descriptor count than the ones allowed in pipeline layouts.
If this seems reasonable, my suggestion would be to split the descriptor set layout into multiple descriptor set layouts (2 should be enough) and then create a pipeline layout. Along this, we should raise this to the maintenance TSG.