aboutsummaryrefslogtreecommitdiff
path: root/layers/draw_state.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2015-06-22 17:21:59 +1200
committerChris Forbes <chrisf@ijw.co.nz>2015-07-07 14:54:05 +1200
commitfaa91734d9f29abfd0f5dcbe9b5fc41f13b36046 (patch)
tree5288e6eb2c950c26826812f399173e4301291b56 /layers/draw_state.cpp
parentc0ff6d2f78350922f81f9103496503662ca4df62 (diff)
downloadusermoji-faa91734d9f29abfd0f5dcbe9b5fc41f13b36046.tar.xz
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>
Diffstat (limited to 'layers/draw_state.cpp')
-rw-r--r--layers/draw_state.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index b99a5b19..3da7d54c 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -249,9 +249,9 @@ static void insertDynamicState(const VkDynamicStateObject state, const GENERIC_H
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 vkCmdClearColorImage(
}
}
-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 @@ VK_LAYER_EXPORT void VKAPI vkCmdClearDepthStencil(VkCmdBuffer cmdBuffer,
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 @@ VK_LAYER_EXPORT void* VKAPI vkGetDeviceProcAddr(VkDevice dev, const char* funcNa
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"))