diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-10-15 16:51:05 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-10-23 17:31:13 -0600 |
| commit | 21eb93d89a7ac0cd281d7bb3ca277c7fc7163380 (patch) | |
| tree | ed2b12c9c8e9ba82ce9360cb1c15be6b2083d5a6 /loader | |
| parent | 0db2c910ea48122e229ea45ad3301bf9a70a5331 (diff) | |
| download | usermoji-21eb93d89a7ac0cd281d7bb3ca277c7fc7163380.tar.xz | |
bug-14291: combine color and depth/stencil clears
Diffstat (limited to 'loader')
| -rw-r--r-- | loader/gpa_helper.h | 6 | ||||
| -rw-r--r-- | loader/table_ops.h | 9 | ||||
| -rw-r--r-- | loader/trampoline.c | 13 |
3 files changed, 7 insertions, 21 deletions
diff --git a/loader/gpa_helper.h b/loader/gpa_helper.h index f33ac67a..d462694a 100644 --- a/loader/gpa_helper.h +++ b/loader/gpa_helper.h @@ -285,10 +285,8 @@ static inline void* globalGetProcAddr(const char *name) return (void*) vkCmdClearColorImage; if (!strcmp(name, "CmdClearDepthStencilImage")) return (void*) vkCmdClearDepthStencilImage; - if (!strcmp(name, "CmdClearColorAttachment")) - return (void*) vkCmdClearColorAttachment; - if (!strcmp(name, "CmdClearDepthStencilAttachment")) - return (void*) vkCmdClearDepthStencilAttachment; + if (!strcmp(name, "CmdClearAttachments")) + return (void*) vkCmdClearAttachments; if (!strcmp(name, "CmdResolveImage")) return (void*) vkCmdResolveImage; if (!strcmp(name, "CmdSetEvent")) diff --git a/loader/table_ops.h b/loader/table_ops.h index 6c732d0a..a10fe8a1 100644 --- a/loader/table_ops.h +++ b/loader/table_ops.h @@ -149,8 +149,7 @@ static inline void loader_init_device_dispatch_table(VkLayerDispatchTable *table table->CmdFillBuffer = (PFN_vkCmdFillBuffer) gpa(dev, "vkCmdFillBuffer"); table->CmdClearColorImage = (PFN_vkCmdClearColorImage) gpa(dev, "vkCmdClearColorImage"); table->CmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage) gpa(dev, "vkCmdClearDepthStencilImage"); - table->CmdClearColorAttachment = (PFN_vkCmdClearColorAttachment) gpa(dev, "vkCmdClearColorAttachment"); - table->CmdClearDepthStencilAttachment = (PFN_vkCmdClearDepthStencilAttachment) gpa(dev, "vkCmdClearDepthStencilAttachment"); + table->CmdClearAttachments = (PFN_vkCmdClearAttachments) gpa(dev, "vkCmdClearAttachments"); table->CmdResolveImage = (PFN_vkCmdResolveImage) gpa(dev, "vkCmdResolveImage"); table->CmdSetEvent = (PFN_vkCmdSetEvent) gpa(dev, "vkCmdSetEvent"); table->CmdResetEvent = (PFN_vkCmdResetEvent) gpa(dev, "vkCmdResetEvent"); @@ -413,10 +412,8 @@ static inline void *loader_lookup_device_dispatch_table( return (void *) table->CmdClearColorImage; if (!strcmp(name, "CmdClearDepthStencilImage")) return (void *) table->CmdClearDepthStencilImage; - if (!strcmp(name, "CmdClearColorAttachment")) - return (void *) table->CmdClearColorAttachment; - if (!strcmp(name, "CmdClearDepthStencilAttachment")) - return (void *) table->CmdClearDepthStencilAttachment; + if (!strcmp(name, "CmdClearAttachments")) + return (void *) table->CmdClearAttachments; if (!strcmp(name, "CmdResolveImage")) return (void *) table->CmdResolveImage; if (!strcmp(name, "CmdSetEvent")) diff --git a/loader/trampoline.c b/loader/trampoline.c index e87d151e..c7a6394c 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -1357,22 +1357,13 @@ LOADER_EXPORT void VKAPI vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkIm disp->CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); } -LOADER_EXPORT void VKAPI vkCmdClearColorAttachment(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects) +LOADER_EXPORT void VKAPI vkCmdClearAttachments(VkCmdBuffer cmdBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkRect3D* pRects) { const VkLayerDispatchTable *disp; disp = loader_get_dispatch(cmdBuffer); - disp->CmdClearColorAttachment(cmdBuffer, colorAttachment, imageLayout, pColor, rectCount, pRects); -} - -LOADER_EXPORT void VKAPI vkCmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue *pDepthStencil, uint32_t rectCount, const VkRect3D* pRects) -{ - const VkLayerDispatchTable *disp; - - disp = loader_get_dispatch(cmdBuffer); - - disp->CmdClearDepthStencilAttachment(cmdBuffer, imageAspectMask, imageLayout, pDepthStencil, rectCount, pRects); + disp->CmdClearAttachments(cmdBuffer, attachmentCount, pAttachments, rectCount, pRects); } LOADER_EXPORT void VKAPI vkCmdResolveImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) |
