From 7ac52e831af1959dbc871e9960d6d1dc05e0402e Mon Sep 17 00:00:00 2001 From: Mark Young Date: Thu, 24 Mar 2016 10:14:35 -0600 Subject: layers: Fix issue when sub-passes have diff attachment count. In core_validation, if the attachment count between a primary and secondary sub-pass was different, then it should treat the shorter one as UNUSED. So, if the longer one has the attachment flags set to UNUSED, it shouldn't be an error. Change-Id: I3647403551962ef522e7e2ba7ab10a5cb7466c52 --- layers/core_validation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index cfc9ae7e..a11a214b 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2247,11 +2247,11 @@ static bool attachment_references_compatible(const uint32_t index, const VkAttac const VkAttachmentReference *pSecondary, const uint32_t secondaryCount, const VkAttachmentDescription *pSecondaryAttachments) { if (index >= primaryCount) { // Check secondary as if primary is VK_ATTACHMENT_UNUSED - if (VK_ATTACHMENT_UNUSED != pSecondary[index].attachment) - return false; + if (VK_ATTACHMENT_UNUSED == pSecondary[index].attachment) + return true; } else if (index >= secondaryCount) { // Check primary as if secondary is VK_ATTACHMENT_UNUSED - if (VK_ATTACHMENT_UNUSED != pPrimary[index].attachment) - return false; + if (VK_ATTACHMENT_UNUSED == pPrimary[index].attachment) + return true; } else { // format and sample count must match if ((pPrimaryAttachments[pPrimary[index].attachment].format == pSecondaryAttachments[pSecondary[index].attachment].format) && -- cgit v1.2.3