aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-10-25 16:32:54 +1300
committerChris Forbes <chrisforbes@google.com>2016-11-01 09:57:57 +1300
commit21560731fb702a9a6e6ce562c2a6a1f215fc05ce (patch)
tree18ca5a7b6b3b997414584a03d8cd1b47d5f53571 /layers/core_validation.cpp
parentb4b9918525034b79145bb23825566648f0285222 (diff)
downloadusermoji-21560731fb702a9a6e6ce562c2a6a1f215fc05ce.tar.xz
layers: Rework some names a bit in CmdClearAttachments
I want to use some of these names for other things... Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 6bace130..547e403a 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -8652,24 +8652,24 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, ui
const VkRenderPassCreateInfo *pRPCI = pCB->activeRenderPass->createInfo.ptr();
const VkSubpassDescription *pSD = &pRPCI->pSubpasses[pCB->activeSubpass];
- for (uint32_t attachment_idx = 0; attachment_idx < attachmentCount; attachment_idx++) {
- const VkClearAttachment *attachment = &pAttachments[attachment_idx];
- if (attachment->aspectMask & VK_IMAGE_ASPECT_COLOR_BIT) {
- if (attachment->colorAttachment >= pSD->colorAttachmentCount) {
+ for (uint32_t i = 0; i < attachmentCount; i++) {
+ auto clear_desc = &pAttachments[i];
+ if (clear_desc->aspectMask & VK_IMAGE_ASPECT_COLOR_BIT) {
+ if (clear_desc->colorAttachment >= pSD->colorAttachmentCount) {
skip_call |= log_msg(
dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
(uint64_t)commandBuffer, __LINE__, DRAWSTATE_MISSING_ATTACHMENT_REFERENCE, "DS",
"vkCmdClearAttachments() color attachment index %d out of range for active subpass %d; ignored",
- attachment->colorAttachment, pCB->activeSubpass);
+ clear_desc->colorAttachment, pCB->activeSubpass);
}
- else if (pSD->pColorAttachments[attachment->colorAttachment].attachment == VK_ATTACHMENT_UNUSED) {
+ else if (pSD->pColorAttachments[clear_desc->colorAttachment].attachment == VK_ATTACHMENT_UNUSED) {
skip_call |= log_msg(
dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
(uint64_t)commandBuffer, __LINE__, DRAWSTATE_MISSING_ATTACHMENT_REFERENCE, "DS",
"vkCmdClearAttachments() color attachment index %d is VK_ATTACHMENT_UNUSED; ignored",
- attachment->colorAttachment);
+ clear_desc->colorAttachment);
}
- } else if (attachment->aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
+ } else if (clear_desc->aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
if (!pSD->pDepthStencilAttachment || // Says no DS will be used in active subpass
(pSD->pDepthStencilAttachment->attachment ==
VK_ATTACHMENT_UNUSED)) { // Says no DS will be used in active subpass