aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTony Barbour <tony@LunarG.com>2017-02-10 13:41:15 -0700
committerTony-LunarG <tony@lunarg.com>2017-02-10 15:23:36 -0700
commitf6f11f18351395e24b53043b766b4802f526e252 (patch)
tree3516bd3ea97af02ce68c31591ef6e1118c84f366 /layers/core_validation.cpp
parent555c8484bd88b77b080eab3d4d5777b69ec40e30 (diff)
downloadusermoji-f6f11f18351395e24b53043b766b4802f526e252.tar.xz
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
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 3c84942c..9f48c634 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;
}