<div dir="auto">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Feb 27, 2017 5:20 PM, "Nanley Chery" <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Cc: <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
 src/intel/vulkan/anv_pass.c | 22 +++++++++++++---------<br>
 1 file changed, 13 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c<br>
index 2df18260d3..a8b24703bc 100644<br>
--- a/src/intel/vulkan/anv_pass.c<br>
+++ b/src/intel/vulkan/anv_pass.c<br>
@@ -116,13 +116,15 @@ VkResult anv_CreateRenderPass(<br>
          for (uint32_t j = 0; j < desc->inputAttachmentCount; j++) {<br>
             uint32_t a = desc->pInputAttachments[j].<wbr>attachment;<br>
             subpass->input_attachments[j] = a;<br>
-            pass->attachments[a].usage |= VK_IMAGE_USAGE_INPUT_<wbr>ATTACHMENT_BIT;<br>
-            pass->attachments[a].subpass_<wbr>usage[i] |= ANV_SUBPASS_USAGE_INPUT;<br>
-            pass->attachments[a].last_<wbr>subpass_idx = i;<br>
+            if (a != VK_ATTACHMENT_UNUSED) {<br>
+               pass->attachments[a].usage |= VK_IMAGE_USAGE_INPUT_<wbr>ATTACHMENT_BIT;<br>
+               pass->attachments[a].subpass_<wbr>usage[i] |= ANV_SUBPASS_USAGE_INPUT;<br>
+               pass->attachments[a].last_<wbr>subpass_idx = i;<br>
<br>
-            if (desc->pDepthStencilAttachment &&<br>
-                a == desc->pDepthStencilAttachment-<wbr>>attachment)<br>
-               subpass->has_ds_self_dep = true;<br>
+               if (desc->pDepthStencilAttachment &&<br>
+                   a == desc->pDepthStencilAttachment-<wbr>>attachment)<br>
+                  subpass->has_ds_self_dep = true;<br>
+            }<br>
          }<br>
       }<br>
<br>
@@ -133,9 +135,11 @@ VkResult anv_CreateRenderPass(<br>
          for (uint32_t j = 0; j < desc->colorAttachmentCount; j++) {<br>
             uint32_t a = desc->pColorAttachments[j].<wbr>attachment;<br>
             subpass->color_attachments[j] = a;<br>
-            pass->attachments[a].usage |= VK_IMAGE_USAGE_COLOR_<wbr>ATTACHMENT_BIT;<br>
-            pass->attachments[a].subpass_<wbr>usage[i] |= ANV_SUBPASS_USAGE_DRAW;<br>
-            pass->attachments[a].last_<wbr>subpass_idx = i;<br>
+            if (a != VK_ATTACHMENT_UNUSED) {<br>
+               pass->attachments[a].usage |= VK_IMAGE_USAGE_COLOR_<wbr>ATTACHMENT_BIT;<br>
+               pass->attachments[a].subpass_<wbr>usage[i] |= ANV_SUBPASS_USAGE_DRAW;<br>
+               pass->attachments[a].last_<wbr>subpass_idx = i;<br>
+            }<br>
          }<br>
       }<br>
<br>
--<br>
2.11.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>