<div dir="auto"><div>Why store aux usage and not the just image layout?  It doesn't really matter whether we call layout_to_aux_usage here or when we emit the binding tables.  I'm just wondering why you made the choice this way.<br><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="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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_<wbr>descriptor_set.c | 10 ++++++++++<br>
 src/intel/vulkan/anv_private.h        |  5 +++++<br>
 2 files changed, 15 insertions(+)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>descriptor_set.c b/src/intel/vulkan/anv_<wbr>descriptor_set.c<br>
index 7853ec7dd9..369698174e 100644<br>
--- a/src/intel/vulkan/anv_<wbr>descriptor_set.c<br>
+++ b/src/intel/vulkan/anv_<wbr>descriptor_set.c<br>
@@ -623,6 +623,11 @@ void anv_UpdateDescriptorSets(<br>
                .type = VK_DESCRIPTOR_TYPE_COMBINED_<wbr>IMAGE_SAMPLER,<br>
                .image_view = iview,<br>
                .sampler = sampler,<br>
+               .aux_usage =<br>
+                  anv_layout_to_aux_usage(<wbr>device->info.gen, iview->image,<br>
+                                          iview->aspect_mask,<br>
+                                          write->pImageInfo[j].<wbr>imageLayout,<br>
+                                          write->pImageInfo[j].<wbr>imageLayout),<br>
             };<br>
          }<br>
          break;<br>
@@ -637,6 +642,11 @@ void anv_UpdateDescriptorSets(<br>
             desc[j] = (struct anv_descriptor) {<br>
                .type = write->descriptorType,<br>
                .image_view = iview,<br>
+               .aux_usage =<br>
+                  anv_layout_to_aux_usage(<wbr>device->info.gen, iview->image,<br>
+                                          iview->aspect_mask,<br>
+                                          write->pImageInfo[j].<wbr>imageLayout,<br>
+                                          write->pImageInfo[j].<wbr>imageLayout),<br>
             };<br>
          }<br>
          break;<br>
diff --git a/src/intel/vulkan/anv_<wbr>private.h b/src/intel/vulkan/anv_<wbr>private.h<br>
index b51c6a643d..42f884d7b0 100644<br>
--- a/src/intel/vulkan/anv_<wbr>private.h<br>
+++ b/src/intel/vulkan/anv_<wbr>private.h<br>
@@ -897,6 +897,11 @@ struct anv_descriptor {<br>
       struct {<br>
          struct anv_image_view *image_view;<br>
          struct anv_sampler *sampler;<br>
+<br>
+         /* Used to determine whether or not we need the surface state to have<br>
+          * the auxiliary buffer enabled.<br>
+          */<br>
+         enum isl_aux_usage aux_usage;<br>
       };<br>
<br>
       struct anv_buffer_view *buffer_view;<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>