layers: Drawstate verify viewport and scissor state at PSO creation time
Make sure that viewportCount and scissorCount match
If viewport is not dynamic, make sure viewport state is supplied and if viewportCount is non-zero, that viewport data is non-NULL.
If scissor is not dynamic, make sure scissor state is supplied and if scissorCount is non-zero, that scissor data is non-NULL.
Added tests to hit these new cases.
diff --git a/layers/draw_state.h b/layers/draw_state.h
index 4399bd8..e42c5e4 100644
--- a/layers/draw_state.h
+++ b/layers/draw_state.h
@@ -67,6 +67,7 @@
DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, // DescriptorSet bound but it was never updated. This is a warning code.
DRAWSTATE_CLEAR_CMD_BEFORE_DRAW, // Clear cmd issued before any Draw in CmdBuffer, should use RenderPass Ops instead
DRAWSTATE_BEGIN_CB_INVALID_STATE, // Primary/Secondary CB created with mismatched FB/RP information
+ DRAWSTATE_VIEWPORT_SCISSOR_MISMATCH, // Count for viewports and scissors mismatch and/or state doesn't match count
DRAWSTATE_INVALID_EXTENSION,
} DRAW_STATE_ERROR;