[Mesa-dev] [PATCH 1.5/14] i965/miptree: Add an intel_tiling_supports_hiz helper

Jason Ekstrand jason at jlekstrand.net
Mon Jul 17 17:53:29 UTC 2017


On Mon, Jul 17, 2017 at 10:42 AM, Pohjolainen, Topi <
topi.pohjolainen at gmail.com> wrote:

> On Mon, Jul 17, 2017 at 08:04:40AM -0700, Jason Ekstrand wrote:
> > We need this split for the same reason that we need the split for CCS:
> > intel_miptree_supports_hiz is called *before* we choose the actual
> > tiling.  Adding a tiling_supports_hiz helper lets choose_aux_usage
> > more accurately decide whether or not to enable hiz.  In particular,
> > this prevents us from enabling HiZ on linear depth buffers.
> >
> > Cc: Topi Pohjolainen <topi.pohjolainen at gmail.com>
> > ---
> >  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 12 +++++++++++-
> >  1 file changed, 11 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 12b8d04..0fc9b67 100644
> > --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > @@ -213,6 +213,15 @@ intel_miptree_supports_ccs(struct brw_context *brw,
> >  }
> >
> >  static bool
> > +intel_tiling_supports_hiz(const struct brw_context *brw, unsigned
> tiling)
> > +{
> > +   if (brw->gen < 6)
> > +      return false;
> > +
> > +   return tiling == I915_TILING_Y;
> > +}
> > +
> > +static bool
> >  intel_miptree_supports_hiz(struct brw_context *brw,
> >                             struct intel_mipmap_tree *mt)
> >  {
> > @@ -597,7 +606,8 @@ intel_miptree_choose_aux_usage(struct brw_context
> *brw,
> >        } else {
> >           mt->aux_usage = ISL_AUX_USAGE_CCS_D;
> >        }
> > -   } else if (intel_miptree_supports_hiz(brw, mt)) {
> > +   } else if (intel_tiling_supports_hiz(brw, mt) &&
>
>       } else if (intel_tiling_supports_hiz(brw, mt->tiling) &&
>

Yup.  Already found+fixed.


> With that:
>
> Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
>

Thanks!


> > +              intel_miptree_supports_hiz(brw, mt)) {
> >        mt->aux_usage = ISL_AUX_USAGE_HIZ;
> >     }
> >
> > --
> > 2.5.0.400.gff86faf
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170717/209570eb/attachment.html>


More information about the mesa-dev mailing list