Quick answer: Vulkan validation layer complaining about descriptor set binding incompatibility? The pipeline layout’s set N must match the set N you bind at draw — bindings, types, and stages all have to agree.
A draw with vkCmdBindDescriptorSets triggers VUID-vkCmdBindDescriptorSets-pDescriptorSets-00358. Layout used to allocate the set doesn’t match the pipeline’s expected layout.
Layout Compatibility
Two descriptor set layouts are compatible if they have identical bindings (number, type, count, stage flags, immutable samplers). Even a stage-flags difference fails the check.
Use the Same Layout
Easiest: create the descriptor set layout once, use the same handle for both pipeline layout creation and descriptor set allocation. No drift possible.
Set-Level Compatibility
Pipeline layouts are compatible up to set N if sets 0..N-1 are pairwise compatible. Switching pipelines only re-binds sets at or after the first incompatible one.
Push Descriptors
For small frequently-changing data, use VK_KHR_push_descriptor — bypasses set allocation, layout still must match.
Verifying
Validation layer silent across pipeline switches. RenderDoc capture shows correct set bindings at each draw.
“Layouts must be identical, not just shaped right. Share the handle to share the layout.”
Define your descriptor set layouts once in a central registry — pipelines reference them by ID. Removes the most common cause of incompatibility errors.