<div dir="ltr">We took it out with good reason... I'd rather we do something similar to what we did for render targets and just pass aux usage directly from brw_predraw_resolve_inputs to brw_wm_surface_state through the context.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 27, 2018 at 1:30 AM,  <span dir="ltr"><<a href="mailto:kevin.rogovin@intel.com" target="_blank">kevin.rogovin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Kevin Rogovin <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>><br>
<br>
Signed-off-by: Kevin Rogovin <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>><br>
---<br>
 src/mesa/drivers/dri/i965/brw_<wbr>draw.c          | 9 ++++++---<br>
 src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 5 +++--<br>
 src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h | 3 ++-<br>
 3 files changed, 11 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_draw.c b/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
index 299e7f9..0241035 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
@@ -447,7 +447,8 @@ brw_predraw_resolve_inputs(<wbr>struct brw_context *brw, bool rendering,<br>
<br>
       intel_miptree_prepare_texture(<wbr>brw, tex_obj->mt, view_format,<br>
                                     min_level, num_levels,<br>
-                                    min_layer, num_layers);<br>
+                                    min_layer, num_layers,<br>
+                                    false);<br>
<br>
       /* If any programs are using it with texelFetch, we may need to also do<br>
        * a prepare with an sRGB format to ensure texelFetch works "properly".<br>
@@ -458,7 +459,8 @@ brw_predraw_resolve_inputs(<wbr>struct brw_context *brw, bool rendering,<br>
          if (txf_format != view_format) {<br>
             intel_miptree_prepare_texture(<wbr>brw, tex_obj->mt, txf_format,<br>
                                           min_level, num_levels,<br>
-                                          min_layer, num_layers);<br>
+                                          min_layer, num_layers,<br>
+                                          false);<br>
          }<br>
       }<br>
<br>
@@ -530,7 +532,8 @@ brw_predraw_resolve_<wbr>framebuffer(struct brw_context *brw,<br>
          if (irb) {<br>
             intel_miptree_prepare_texture(<wbr>brw, irb->mt, irb->mt->surf.format,<br>
                                           irb->mt_level, 1,<br>
-                                          irb->mt_layer, irb->layer_count);<br>
+                                          irb->mt_layer, irb->layer_count,<br>
+                                          false);<br>
          }<br>
       }<br>
    }<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
index c6213b2..dbd9f7a 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
@@ -2648,9 +2648,10 @@ intel_miptree_prepare_texture(<wbr>struct brw_context *brw,<br>
                               struct intel_mipmap_tree *mt,<br>
                               enum isl_format view_format,<br>
                               uint32_t start_level, uint32_t num_levels,<br>
-                              uint32_t start_layer, uint32_t num_layers)<br>
+                              uint32_t start_layer, uint32_t num_layers,<br>
+                              bool disable_aux)<br>
 {<br>
-   enum isl_aux_usage aux_usage =<br>
+   enum isl_aux_usage aux_usage = (disable_aux) ? ISL_AUX_USAGE_NONE :<br>
       intel_miptree_texture_aux_<wbr>usage(brw, mt, view_format);<br>
    bool clear_supported = aux_usage != ISL_AUX_USAGE_NONE;<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
index 07c8580..ee72309 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
@@ -642,7 +642,8 @@ intel_miptree_prepare_texture(<wbr>struct brw_context *brw,<br>
                               struct intel_mipmap_tree *mt,<br>
                               enum isl_format view_format,<br>
                               uint32_t start_level, uint32_t num_levels,<br>
-                              uint32_t start_layer, uint32_t num_layers);<br>
+                              uint32_t start_layer, uint32_t num_layers,<br>
+                              bool disable_aux);<br>
 void<br>
 intel_miptree_prepare_image(<wbr>struct brw_context *brw,<br>
                             struct intel_mipmap_tree *mt);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<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></span></blockquote></div><br></div>