From 6ce184953cf1788f9b0752de4a762a9ff617c3a2 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Thu, 15 Oct 2015 18:22:08 -0600 Subject: [PATCH] misc: Change clear rectangle to include array layer/count commit: 53a511d --- icd/nulldrv/nulldrv.c | 2 +- include/vulkan.h | 8 +++++--- layers/draw_state.cpp | 2 +- layers/image.cpp | 2 +- layers/param_checker.cpp | 4 ++-- loader/trampoline.c | 2 +- vulkan.py | 2 +- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/icd/nulldrv/nulldrv.c b/icd/nulldrv/nulldrv.c index 3814bb0b..a4b76cbe 100644 --- a/icd/nulldrv/nulldrv.c +++ b/icd/nulldrv/nulldrv.c @@ -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; } diff --git a/include/vulkan.h b/include/vulkan.h index 6bc464e6..8a86edd3 100644 --- a/include/vulkan.h +++ b/include/vulkan.h @@ -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, diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 3317a43b..b9e24ea1 100755 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -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); diff --git a/layers/image.cpp b/layers/image.cpp index a776961b..e40536af 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -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; diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp index b42c013e..b217886b 100644 --- a/layers/param_checker.cpp +++ b/layers/param_checker.cpp @@ -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); diff --git a/loader/trampoline.c b/loader/trampoline.c index 2faf002d..a2f5d1a5 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -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; diff --git a/vulkan.py b/vulkan.py index 00968576..3a690a48 100755 --- 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"), -- 2.34.1