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/mem_tracker.cpp b/layers/mem_tracker.cpp
index 6b5ead3..0411ca1 100644
--- a/layers/mem_tracker.cpp
+++ b/layers/mem_tracker.cpp
@@ -1938,7 +1938,7 @@
get_dispatch_table(mem_tracker_device_table_map, cmdBuffer)->CmdClearColorImage(cmdBuffer, image, imageLayout, pColor, rangeCount, pRanges);
}
-VK_LAYER_EXPORT void VKAPI vkCmdClearDepthStencil(
+VK_LAYER_EXPORT void VKAPI vkCmdClearDepthStencilImage(
VkCmdBuffer cmdBuffer,
VkImage image,
VkImageLayout imageLayout,
@@ -1952,10 +1952,10 @@
VkDeviceMemory mem = get_mem_binding_from_object(cmdBuffer, image);
if (VK_FALSE == update_cmd_buf_and_mem_references(cmdBuffer, mem)) {
log_msg(mdd(cmdBuffer), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, cmdBuffer, 0, MEMTRACK_MEMORY_BINDING_ERROR, "MEM",
- "In vkCmdClearDepthStencil() call unable to update binding of image buffer %p to cmdBuffer %p", image, cmdBuffer);
+ "In vkCmdClearDepthStencilImage() call unable to update binding of image buffer %p to cmdBuffer %p", image, cmdBuffer);
}
loader_platform_thread_unlock_mutex(&globalLock);
- get_dispatch_table(mem_tracker_device_table_map, cmdBuffer)->CmdClearDepthStencil(
+ get_dispatch_table(mem_tracker_device_table_map, cmdBuffer)->CmdClearDepthStencilImage(
cmdBuffer, image, imageLayout, depth, stencil, rangeCount, pRanges);
}
@@ -2267,8 +2267,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, "vkCmdBeginQuery"))