misc: Change clear rectangle to include array layer/count
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Fri, 16 Oct 2015 00:22:08 +0000 (18:22 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Fri, 23 Oct 2015 23:32:04 +0000 (17:32 -0600)
commit: 53a511d

icd/nulldrv/nulldrv.c
include/vulkan.h
layers/draw_state.cpp
layers/image.cpp
layers/param_checker.cpp
loader/trampoline.c
vulkan.py

index 3814bb0b13f28449627c1848b02415a9e716b884..a4b76cbe621601ebc17d2044861f3f49c30b9018 100644 (file)
@@ -953,7 +953,7 @@ ICD_EXPORT void VKAPI vkCmdClearAttachments(
     uint32_t                                    attachmentCount,
     const VkClearAttachment*                    pAttachments,
     uint32_t                                    rectCount,
-    const VkRect3D*                             pRects)
+    const VkClearRect*                          pRects)
 {
     NULLDRV_LOG_FUNC;
 }
index 6bc464e626b9d3b97191ab46fa655ecba47d4abe..8a86edd39bc967c0261ba3a9d927f8b45548f2b8 100644 (file)
@@ -2007,7 +2007,9 @@ typedef struct {
 typedef struct {
     VkOffset3D                                  offset;
     VkExtent3D                                  extent;
-} VkRect3D;
+    uint32_t                                    baseArrayLayer;
+    uint32_t                                    numLayers;
+} VkClearRect;
 
 typedef struct {
     VkImageSubresourceCopy                      srcSubresource;
@@ -2209,7 +2211,7 @@ typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer dest
 typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
 typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
 typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
-typedef void (VKAPI *PFN_vkCmdClearAttachments)(VkCmdBuffer cmdBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkRect3D* pRects);
+typedef void (VKAPI *PFN_vkCmdClearAttachments)(VkCmdBuffer cmdBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects);
 typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
 typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
 typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
@@ -2907,7 +2909,7 @@ void VKAPI vkCmdClearAttachments(
     uint32_t                                    attachmentCount,
     const VkClearAttachment*                    pAttachments,
     uint32_t                                    rectCount,
-    const VkRect3D*                             pRects);
+    const VkClearRect*                          pRects);
 
 void VKAPI vkCmdResolveImage(
     VkCmdBuffer                                 cmdBuffer,
index 3317a43b0a6650320f25bbdf4879849613df330d..b9e24ea1b79856c1141edaddcbdd434320baf27a 100755 (executable)
@@ -2767,7 +2767,7 @@ VK_LAYER_EXPORT void VKAPI vkCmdClearAttachments(
     uint32_t                                    attachmentCount,
     const VkClearAttachment*                    pAttachments,
     uint32_t                                    rectCount,
-    const VkRect3D*                             pRects)
+    const VkClearRect*                          pRects)
 {
     VkBool32 skipCall = VK_FALSE;
     layer_data* dev_data = get_my_data_ptr(get_dispatch_key(cmdBuffer), layer_data_map);
index a776961bd0ab9bf12a52e1a3d0b49f480a15afcd..e40536aff1a0153c0a14feb2f65aea2db2e05aa3 100644 (file)
@@ -545,7 +545,7 @@ void VKAPI vkCmdClearAttachments(
     uint32_t                                    attachmentCount,
     const VkClearAttachment*                    pAttachments,
     uint32_t                                    rectCount,
-    const VkRect3D*                             pRects)
+    const VkClearRect*                          pRects)
 {
     VkBool32 skipCall = VK_FALSE;
     VkImageAspectFlags aspectMask;
index b42c013ecc1e02a25aad37e12280eac4edcbc15e..b217886bb8bbcd66a720eae8d131b71b7440fa78 100644 (file)
@@ -6182,7 +6182,7 @@ VK_LAYER_EXPORT void VKAPI vkCmdClearDepthStencilImage(
 bool PreCmdClearAttachments(
     VkCmdBuffer cmdBuffer,
     const VkClearColorValue* pColor,
-    const VkRect3D* pRects)
+    const VkClearRect* pRects)
 {
     if(pColor != nullptr)
     {
@@ -6200,7 +6200,7 @@ VK_LAYER_EXPORT void VKAPI vkCmdClearAttachments(
     uint32_t                                    attachmentCount,
     const VkClearAttachment*                    pAttachments,
     uint32_t                                    rectCount,
-    const VkRect3D*                             pRects)
+    const VkClearRect*                          pRects)
 {
     for (uint32_t i = 0; i < attachmentCount; i++) {
         PreCmdClearAttachments(cmdBuffer, &pAttachments[i].clearValue.color, pRects);
index 2faf002db7754ae804b0ee08d938e1abc41b4bf0..a2f5d1a5d692378d9a93f066e3078e83c302c7bc 100644 (file)
@@ -1340,7 +1340,7 @@ LOADER_EXPORT void VKAPI vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkIm
     disp->CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges);
 }
 
-LOADER_EXPORT void VKAPI vkCmdClearAttachments(VkCmdBuffer cmdBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkRect3D* pRects)
+LOADER_EXPORT void VKAPI vkCmdClearAttachments(VkCmdBuffer cmdBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects)
 {
     const VkLayerDispatchTable *disp;
 
index 0096857694bc99a5c4208d8c49da230d48d3e5af..3a690a488ee1c108addabddf13eafd48efbcc684 100755 (executable)
--- a/vulkan.py
+++ b/vulkan.py
@@ -824,7 +824,7 @@ core = Extension(
              Param("uint32_t", "attachmentCount"),
              Param("const VkClearAttachment*", "pAttachments"),
              Param("uint32_t", "rectCount"),
-             Param("const VkRect3D*", "pRects")]),
+             Param("const VkClearRect*", "pRects")]),
 
         Proto("void", "CmdResolveImage",
             [Param("VkCmdBuffer", "cmdBuffer"),