aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Lentine <mlentine@google.com>2016-03-31 13:46:44 -0500
committerTobin Ehlis <tobine@google.com>2016-03-31 14:15:58 -0600
commitae5cfe4e50b13e870321ea8a974aeccfbeaba280 (patch)
tree20608d844f9695a201f2fde219a67f25c77b18fc
parent7a75b6f5ed76cda2a095dde5b206297510c7daa1 (diff)
downloadusermoji-ae5cfe4e50b13e870321ea8a974aeccfbeaba280.tar.xz
Don't validate memory if used for both input and output.
-rw-r--r--layers/core_validation.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 7b974515..b79114e5 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);