layers: Add DrawState check to verify that Pipeline layout from vkCmdBindDescriptorSets() matches layout from PSO at Draw time.
Also fix a bug where PSO status flags were not getting set into Cmd Buffer.
diff --git a/layers/draw_state.h b/layers/draw_state.h
index 40f7f9d..9c64778 100644
--- a/layers/draw_state.h
+++ b/layers/draw_state.h
@@ -54,6 +54,7 @@
DRAWSTATE_COLOR_BLEND_NOT_BOUND, // Draw submitted with no color blend state object bound when color write enabled
DRAWSTATE_DEPTH_STENCIL_NOT_BOUND, // Draw submitted with no depth-stencil state object bound when depth write enabled
DRAWSTATE_INDEX_BUFFER_NOT_BOUND, // Draw submitted with no depth-stencil state object bound when depth write enabled
+ DRAWSTATE_PIPELINE_LAYOUT_MISMATCH, // Draw submitted PSO Pipeline layout that doesn't match layout from BindDescriptorSets
DRAWSTATE_INVALID_EXTENSION,
} DRAW_STATE_ERROR;
@@ -252,6 +253,7 @@
uint32_t lastVtxBinding;
DYNAMIC_STATE_NODE* lastBoundDynamicState[VK_NUM_STATE_BIND_POINT];
VkDescriptorSet lastBoundDescriptorSet;
+ VkPipelineLayout lastBoundPipelineLayout;
VkRenderPass activeRenderPass;
VkFramebuffer framebuffer;
vector<VkDescriptorSet> boundDescriptorSets;