'Multiple VkDescriptorSetLayout for the same VkPipeline?

I have two Entities to be rendered with the same VkPipeline, the problem is that they have different VkDescriptorSetLayout (The first entities uses Dynamic Uniform Buffers, the second only standard Uniform Buffers);

How to pass both VkDescriptorSetLayout to the graphics pipeline, and then bind the correct one during the creation of the command buffer?

With a single VkDescriptorSetLayout, I just pass it to VkPipelineLayoutCreateInfo.pSetLayouts, and then call VkCmdBindDescriptorSet with that VkPipelineLayout.

But with two VkDescriptorSetLayouts, how to correctly bind them to the VkPipelineLayout, and then how to choose the one I want during command buffering?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source