vulkan.h: Split attachment and image clears (#13914, v126)

- Add bit flags for image aspects.
- Replace VkRect with VkRect2D and VkRect3D.
- Rename vkCmdClearDepthStencil to vkCmdClearDepthStencilImage
- Add vkCmdClearColorAttachment and vkCmdClearDepthStencilAttachment

Remaining to be done:
- Actually implement vkCmdClearColorAttachment,
  vkCmdClearDepthStencilAttachment in the Intel ICD
- Enforce renderpass interactions: CmdClear*Attachment may only be
  called within a renderpass; CmdClear*Image may only be called outside
  a renderpass.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index b99a5b1..3da7d54 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -249,9 +249,9 @@
         case VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO:
             memcpy(&pStateNode->create_info, pCreateInfo, sizeof(VkDynamicVpStateCreateInfo));
             pVPCI = (VkDynamicVpStateCreateInfo*)pCreateInfo;
-            pStateNode->create_info.vpci.pScissors = new VkRect[pStateNode->create_info.vpci.viewportAndScissorCount];
+            pStateNode->create_info.vpci.pScissors = new VkRect2D[pStateNode->create_info.vpci.viewportAndScissorCount];
             pStateNode->create_info.vpci.pViewports = new VkViewport[pStateNode->create_info.vpci.viewportAndScissorCount];
-            scSize = pVPCI->viewportAndScissorCount * sizeof(VkRect);
+            scSize = pVPCI->viewportAndScissorCount * sizeof(VkRect2D);
             vpSize = pVPCI->viewportAndScissorCount * sizeof(VkViewport);
             memcpy((void*)pStateNode->create_info.vpci.pScissors, pVPCI->pScissors, scSize);
             memcpy((void*)pStateNode->create_info.vpci.pViewports, pVPCI->pViewports, vpSize);
@@ -2497,7 +2497,7 @@
     }
 }
 
-VK_LAYER_EXPORT void VKAPI vkCmdClearDepthStencil(VkCmdBuffer cmdBuffer,
+VK_LAYER_EXPORT void VKAPI vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer,
                                                      VkImage image, VkImageLayout imageLayout,
                                                      float depth, uint32_t stencil,
                                                      uint32_t rangeCount, const VkImageSubresourceRange* pRanges)
@@ -2507,7 +2507,7 @@
         if (pCB->state == CB_UPDATE_ACTIVE) {
             updateCBTracking(cmdBuffer);
             addCmd(pCB, CMD_CLEARDEPTHSTENCIL);
-            get_dispatch_table(draw_state_device_table_map, cmdBuffer)->CmdClearDepthStencil(cmdBuffer, image, imageLayout, depth, stencil, rangeCount, pRanges);
+            get_dispatch_table(draw_state_device_table_map, cmdBuffer)->CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, depth, stencil, rangeCount, pRanges);
         } else {
             report_error_no_cb_begin(cmdBuffer, "vkCmdBindIndexBuffer()");
         }
@@ -2956,8 +2956,8 @@
         return (void*) vkCmdFillBuffer;
     if (!strcmp(funcName, "vkCmdClearColorImage"))
         return (void*) vkCmdClearColorImage;
-    if (!strcmp(funcName, "vkCmdClearDepthStencil"))
-        return (void*) vkCmdClearDepthStencil;
+    if (!strcmp(funcName, "vkCmdClearDepthStencilImage"))
+        return (void*) vkCmdClearDepthStencilImage;
     if (!strcmp(funcName, "vkCmdResolveImage"))
         return (void*) vkCmdResolveImage;
     if (!strcmp(funcName, "vkCmdSetEvent"))