[Mesa-dev] [PATCH v2 6/6] i965: emit BRW_NEW_AUX_STATE for textures without unresolved colors

Iago Toral Quiroga itoral at igalia.com
Fri Sep 15 10:02:18 UTC 2017


intel_miptree_texture_aux_usage() will report ISL_AUX_USAGE_NONE for
textures that have a fast clear surface when they have been fully
resolved in order to avoid unnecesary aux surface lookups and save
bandwidth. In this case we want to signal new AUX state so we update
the surface state accordingly.
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index ca1f30200b..7363be1466 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2620,8 +2620,10 @@ intel_miptree_texture_aux_usage(struct brw_context *brw,
        * aux surface and we can save some bandwidth.
        */
       if (!intel_miptree_has_color_unresolved(mt, 0, INTEL_REMAINING_LEVELS,
-                                              0, INTEL_REMAINING_LAYERS))
+                                              0, INTEL_REMAINING_LAYERS)) {
+         brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;
          return ISL_AUX_USAGE_NONE;
+      }
 
       if (can_texture_with_ccs(brw, mt, view_format))
          return ISL_AUX_USAGE_CCS_E;
-- 
2.11.0



More information about the mesa-dev mailing list