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

Jason Ekstrand jason at jlekstrand.net
Fri Sep 15 23:48:24 UTC 2017


On Fri, Sep 15, 2017 at 3:02 AM, Iago Toral Quiroga <itoral at igalia.com>
wrote:

> 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))
> {
>

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.


> +         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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170915/9e54a07b/attachment.html>


More information about the mesa-dev mailing list