<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Feb 27, 2017 5:21 PM, "Nanley Chery" <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We'll loop through this array when performing automatic layout<br>
transitions.<br>
<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    | 6 +++++-<br>
 src/intel/vulkan/anv_private.h | 7 +++++++<br>
 2 files changed, 12 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c<br>
index 5bd205d2f0..9d7fa7f83a 100644<br>
--- a/src/intel/vulkan/anv_pass.c<br>
+++ b/src/intel/vulkan/anv_pass.c<br>
@@ -86,9 +86,11 @@ VkResult anv_CreateRenderPass(<br>
       const VkSubpassDescription *desc = &pCreateInfo->pSubpasses[i];<br>
<br>
       subpass_attachment_count +=<br>
+      pass->subpasses[i].attachment_<wbr>count =<br>
          desc->inputAttachmentCount +<br>
          desc->colorAttachmentCount +<br>
-         (desc->pResolveAttachments ? desc->colorAttachmentCount : 0);<br>
+         (desc->pResolveAttachments ? desc->colorAttachmentCount : 0) +<br>
+         (desc->pDepthStencilAttachment != NULL);<br>
    }<br>
<br>
    pass->subpass_attachments =<br>
@@ -108,6 +110,7 @@ VkResult anv_CreateRenderPass(<br>
<br>
       subpass->input_count = desc->inputAttachmentCount;<br>
       subpass->color_count = desc->colorAttachmentCount;<br>
+      subpass->attachments = p;<br>
<br>
       if (desc->inputAttachmentCount > 0) {<br>
          subpass->input_attachments = p;<br>
@@ -169,6 +172,7 @@ VkResult anv_CreateRenderPass(<br>
<br>
       if (desc-><wbr>pDepthStencilAttachment) {<br>
          uint32_t a = desc->pDepthStencilAttachment-<wbr>>attachment;<br>
+         *p++ =<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Something looks funny about this line.  I could easily believe its correct but it should probably be indented differently or something.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          subpass->depth_stencil_<wbr>attachment = *desc-><wbr>pDepthStencilAttachment;<br>
          if (a != VK_ATTACHMENT_UNUSED) {<br>
             pass->attachments[a].usage |=<br>
diff --git a/src/intel/vulkan/anv_<wbr>private.h b/src/intel/vulkan/anv_<wbr>private.h<br>
index 6e274a5a3a..7fba4e92b8 100644<br>
--- a/src/intel/vulkan/anv_<wbr>private.h<br>
+++ b/src/intel/vulkan/anv_<wbr>private.h<br>
@@ -1825,6 +1825,13 @@ struct anv_framebuffer {<br>
 };<br>
<br>
 struct anv_subpass {<br>
+   uint32_t                                     attachment_count;<br>
+<br>
+   /**<br>
+    * A pointer to all attachment references used in this subpass.<br>
+    * Only valid if ::attachment_count > 0.<br>
+    */<br>
+   VkAttachmentReference *                      attachments;<br>
    uint32_t                                     input_count;<br>
    VkAttachmentReference *                      input_attachments;<br>
    uint32_t                                     color_count;<br>
<font color="#888888">--<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>
</font></blockquote></div><br></div></div></div>