From ae5cfe4e50b13e870321ea8a974aeccfbeaba280 Mon Sep 17 00:00:00 2001 From: Michael Lentine Date: Thu, 31 Mar 2016 13:46:44 -0500 Subject: [PATCH] Don't validate memory if used for both input and output. --- layers/core_validation.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 7b97451..b79114e 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -9418,13 +9418,6 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice devic dev_data->renderPassMap[*pRenderPass]->attachment_first_layout; for (uint32_t i = 0; i < pCreateInfo->subpassCount; ++i) { const VkSubpassDescription &subpass = pCreateInfo->pSubpasses[i]; - for (uint32_t j = 0; j < subpass.inputAttachmentCount; ++j) { - uint32_t attachment = subpass.pInputAttachments[j].attachment; - if (attachment_first_read.count(attachment)) - continue; - attachment_first_read.insert(std::make_pair(attachment, true)); - attachment_first_layout.insert(std::make_pair(attachment, subpass.pInputAttachments[j].layout)); - } for (uint32_t j = 0; j < subpass.colorAttachmentCount; ++j) { uint32_t attachment = subpass.pColorAttachments[j].attachment; if (attachment_first_read.count(attachment)) @@ -9439,6 +9432,13 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice devic attachment_first_read.insert(std::make_pair(attachment, false)); attachment_first_layout.insert(std::make_pair(attachment, subpass.pDepthStencilAttachment->layout)); } + for (uint32_t j = 0; j < subpass.inputAttachmentCount; ++j) { + uint32_t attachment = subpass.pInputAttachments[j].attachment; + if (attachment_first_read.count(attachment)) + continue; + attachment_first_read.insert(std::make_pair(attachment, true)); + attachment_first_layout.insert(std::make_pair(attachment, subpass.pInputAttachments[j].layout)); + } } #endif loader_platform_thread_unlock_mutex(&globalLock); -- 2.7.4