layers: In DrawState, validate correct use of RenderPass
This change validates certain API calls are made inside of or outside of a RenderPass as appropriate. Exact restrictions included in this changelist are included below.
Also fixed cube and tri demos to Bind Pipeline & DescriptorSets within RenderPass and updated some layer validation tests.
The following calls must be within RenderPass:
vkCmdBindPipeline() w/ GFX pipelineBindPoint
vkCmdBindDescriptorSets() w/ GFX pipelineBindPoint
vkCmdBindDynamicStateObject()
vkCmdBindIndexBuffer()
vkCmdBindVertexBuffers()
vkCmdEndRenderPass()
The following calls must be outside of RenderPass:
vkCmdBindPipeline() w/ COMPUTE pipelineBindPoint
vkCmdBindDescriptorSets() w/ COMPUTE pipelineBindPoint
vkCmdBlitImage()
vkCmdResolveImage()
vkCmdBeginRenderPass()
diff --git a/layers/draw_state.h b/layers/draw_state.h
index 6d6e2e2..6f8f016 100644
--- a/layers/draw_state.h
+++ b/layers/draw_state.h
@@ -58,6 +58,7 @@
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
+ DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, // DescriptorSet bound but it was never updated. This is a warning code.
DRAWSTATE_INVALID_EXTENSION,
} DRAW_STATE_ERROR;