layers: Add DrawState checks for incompatible layouts at BindDescriptorSets time
At vkCmdBindDescriptorSets() time, verify that each set being bound is compatible
with the referenced VkPipelineLayout "layout". Also track bound descriptorSets per
CommandBuffer and if previously-bound sets outside of the current binding range
are being disturbed, mark them as INVALID and report an INFO message.
diff --git a/layers/draw_state.h b/layers/draw_state.h
index 87ff407..6d28ee2 100755
--- a/layers/draw_state.h
+++ b/layers/draw_state.h
@@ -41,6 +41,7 @@
DRAWSTATE_INVALID_LAYOUT, // Invalid DS layout
DRAWSTATE_INVALID_IMAGE_LAYOUT, // Invalid Image layout
DRAWSTATE_INVALID_PIPELINE, // Invalid Pipeline handle referenced
+ DRAWSTATE_INVALID_PIPELINE_LAYOUT, // Invalid PipelineLayout
DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, // Attempt to create a pipeline with invalid state
DRAWSTATE_INVALID_COMMAND_BUFFER, // Invalid CommandBuffer referenced
DRAWSTATE_INVALID_BARRIER, // Invalid Barrier
@@ -68,7 +69,7 @@
DRAWSTATE_DEPTH_BOUNDS_NOT_BOUND, // Draw submitted with no depth bounds state bound when depth enabled
DRAWSTATE_STENCIL_NOT_BOUND, // Draw submitted with no stencil state bound when stencil enabled
DRAWSTATE_INDEX_BUFFER_NOT_BOUND, // Draw submitted with no depth-stencil state bound when depth write enabled
- DRAWSTATE_PIPELINE_LAYOUT_MISMATCH, // Draw submitted PSO Pipeline layout that doesn't match layout from BindDescriptorSets
+ DRAWSTATE_PIPELINE_LAYOUTS_INCOMPATIBLE, // Draw submitted PSO Pipeline layout that's not compatible with layout from BindDescriptorSets
DRAWSTATE_INVALID_RENDERPASS, // Use of a NULL or otherwise invalid RenderPass object
DRAWSTATE_INVALID_RENDERPASS_CMD, // Invalid cmd submitted while a RenderPass is active
DRAWSTATE_NO_ACTIVE_RENDERPASS, // Rendering cmd submitted without an active RenderPass
@@ -115,7 +116,7 @@
VkPipelineInputAssemblyStateCreateInfo iaStateCI;
VkPipelineTessellationStateCreateInfo tessStateCI;
VkPipelineViewportStateCreateInfo vpStateCI;
- VkPipelineRasterizationStateCreateInfo rsStateCI;
+ VkPipelineRasterizationStateCreateInfo rsStateCI;
VkPipelineMultisampleStateCreateInfo msStateCI;
VkPipelineColorBlendStateCreateInfo cbStateCI;
VkPipelineDepthStencilStateCreateInfo dsStateCI;
@@ -361,7 +362,7 @@
uint32_t activeSubpass;
VkFramebuffer framebuffer;
VkCommandBufferLevel level;
- vector<VkDescriptorSet> boundDescriptorSets;
+ vector<VkDescriptorSet> boundDescriptorSets; // Index is set# that given set is bound to
unordered_map<VkImage, IMAGE_CMD_BUF_NODE> imageLayoutMap;
} GLOBAL_CB_NODE;