From f6f11f18351395e24b53043b766b4802f526e252 Mon Sep 17 00:00:00 2001 From: Tony Barbour Date: Fri, 10 Feb 2017 13:41:15 -0700 Subject: [PATCH] layers: Fix CheckPreserved to allow input attachment Attachments that are used (input / color / depth attachment) in a subpass are not allowed in the preserved list, so if they are used as a color, depth or input attachment they should be consided preserved. Color and depth attachments were accounted for, this commit adds input attachment Change-Id: Id87c3c1546092bc64b293bead1d997e0f61f7990 --- layers/core_validation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 3c84942..9f48c63 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -8913,6 +8913,9 @@ static bool CheckPreserved(const layer_data *dev_data, const VkRenderPassCreateI for (uint32_t j = 0; j < subpass.colorAttachmentCount; ++j) { if (attachment == subpass.pColorAttachments[j].attachment) return true; } + for (uint32_t j = 0; j < subpass.inputAttachmentCount; ++j) { + if (attachment == subpass.pInputAttachments[j].attachment) return true; + } if (subpass.pDepthStencilAttachment && subpass.pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { if (attachment == subpass.pDepthStencilAttachment->attachment) return true; } -- 2.7.4