<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 8, 2018 at 8:48 AM, Rafael Antognolli <span dir="ltr"><<a href="mailto:rafael.antognolli@intel.com" target="_blank">rafael.antognolli@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The lower bits seem to have extra fields in every platform but gen8<br>
(even though we don't use them in gen9). So just go ahead and avoid<br>
using them for the address.<br>
<br>
v4: Use Jason's suggestion for comment explaining the change.<br>
<br>
Signed-off-by: Rafael Antognolli <<a href="mailto:rafael.antognolli@intel.com" target="_blank">rafael.antognolli@intel.com</a>><br>
Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br>
Reviewed-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com" target="_blank">topi.pohjolainen@intel.com</a>><br>
---<br>
 src/intel/vulkan/anv_image.c | 23 ++++++++++-------------<br>
 1 file changed, 10 insertions(+), 13 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c<br>
index 4d60f872c1e..b20d791751d 100644<br>
--- a/src/intel/vulkan/anv_image.c<br>
+++ b/src/intel/vulkan/anv_image.c<br>
@@ -1149,19 +1149,16 @@ anv_image_fill_surface_state(s<wbr>truct anv_device *device,<br>
                           .x_offset_sa = tile_x_sa,<br>
                           .y_offset_sa = tile_y_sa);<br>
       state_inout->address = address + offset_B;<br>
-      if (device->info.gen >= 8) {<br>
-         state_inout->aux_address = aux_address;<br>
-      } else {<br>
-         /* On gen7 and prior, the bottom 12 bits of the MCS base address are<br>
-          * used to store other information.  This should be ok, however,<br>
-          * because surface buffer addresses are always 4K page alinged.<br>
-          */<br>
-         uint32_t *aux_addr_dw = state_inout->state.map +<br>
-                                 device->isl_dev.ss.aux_addr_o<wbr>ffset;<br>
-         assert((aux_address & 0xfff) == 0);<br>
-         assert(aux_address == (*aux_addr_dw & 0xfffff000));<br>
-         state_inout->aux_address = *aux_addr_dw;<br>
-      }<br>
+<br>
+      /* With the exception of gen8, the bottom 12 bits of the MCS base address<br>
+       * are used to store other information.  This should be ok, however,<br>
+       * because the surface buffer addresses are always 4K page aligned.<br>
+       */<br></blockquote><div><br></div><div>We should also update the comment on the aux_address field in anv_private.h<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+      uint32_t *aux_addr_dw = state_inout->state.map +<br>
+         device->isl_dev.ss.aux_addr_o<wbr>ffset;<br>
+      assert((aux_address & 0xfff) == 0);<br>
+      assert(aux_address == (*aux_addr_dw & 0xfffff000));<br>
+      state_inout->aux_address = *aux_addr_dw;<br></blockquote><div><br></div><div>Now that I think about this a bit harder, I think this is going to get sticky in the future since it throws away all but the bottom 32 bits.  I think it's probably ok since we do have a good assert there.  Feel free to ignore this comment for now.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    }<br>
<br>
    anv_state_flush(device, state_inout->state);<br>
<span class="m_8115151009753447738HOEnZb"><font color="#888888">--<br>
2.14.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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></span></blockquote></div><br></div></div>