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
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) &&