aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-03-24 10:14:35 -0600
committerTobin Ehlis <tobine@google.com>2016-03-25 12:13:35 -0600
commit7ac52e831af1959dbc871e9960d6d1dc05e0402e (patch)
tree43f9236c0c383a1a871b8f4229674fd100d25724 /layers/core_validation.cpp
parent0b33b566f126a4ca9dd3585be794340d3366af7f (diff)
downloadusermoji-7ac52e831af1959dbc871e9960d6d1dc05e0402e.tar.xz
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
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp8
1 files changed, 4 insertions, 4 deletions
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) &&