<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 15, 2017 at 3:02 AM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">intel_miptree_texture_aux_<wbr>usage() will report ISL_AUX_USAGE_NONE for<br>
textures that have a fast clear surface when they have been fully<br>
resolved in order to avoid unnecesary aux surface lookups and save<br>
bandwidth. In this case we want to signal new AUX state so we update<br>
the surface state accordingly.<br>
---<br>
 src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 4 +++-<br>
 1 file changed, 3 insertions(+), 1 deletion(-)<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 ca1f30200b..7363be1466 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>
@@ -2620,8 +2620,10 @@ intel_miptree_texture_aux_<wbr>usage(struct brw_context *brw,<br>
        * aux surface and we can save some bandwidth.<br>
        */<br>
       if (!intel_miptree_has_color_<wbr>unresolved(mt, 0, INTEL_REMAINING_LEVELS,<br>
-                                              0, INTEL_REMAINING_LAYERS))<br>
+                                              0, INTEL_REMAINING_LAYERS)) {<br></blockquote><div><br></div><div>intel_miptree_has_color_unresolved is calculated entirely based on aux_state so if it ever changes, aux_state will have changed.  I think setting BRW_NEW_AUX_STATE when aux_state changes is sufficient and we don't need to flag it here as well.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+         brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;<br>
          return ISL_AUX_USAGE_NONE;<br>
+      }<br>
<br>
       if (can_texture_with_ccs(brw, mt, view_format))<br>
          return ISL_AUX_USAGE_CCS_E;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.0<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></div>