[Mesa-dev] [PATCH 18/22] i965/miptree: Prepare aux state map for isl based

Jason Ekstrand jason at jlekstrand.net
Thu Jul 20 04:57:19 UTC 2017


On Wed, Jul 19, 2017 at 6:57 AM, Pohjolainen, Topi <
topi.pohjolainen at gmail.com> wrote:

> On Tue, Jul 18, 2017 at 02:11:59PM -0700, Jason Ekstrand wrote:
> > On Tue, Jul 18, 2017 at 1:46 AM, Topi Pohjolainen <
> > topi.pohjolainen at gmail.com> wrote:
> >
> > > Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> > > ---
> > >  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 21
> ++++++++++++++++++---
> > >  1 file changed, 18 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > index d96f5c7938..fafd0c1e59 100644
> > > --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > @@ -696,8 +696,14 @@ create_aux_state_map(struct intel_mipmap_tree *mt,
> > >     const uint32_t levels = mt->last_level + 1;
> > >
> > >     uint32_t total_slices = 0;
> > > -   for (uint32_t level = 0; level < levels; level++)
> > > -      total_slices += mt->level[level].depth;
> > > +   for (uint32_t level = 0; level < levels; level++) {
> > > +      if (mt->surf.size > 0)
> > > +         total_slices += (mt->surf.dim == ISL_SURF_DIM_3D ?
> > > +                             minify(mt->surf.phys_level0_sa.depth,
> > > level) :
> > > +                             mt->surf.phys_level0_sa.array_len);
> > > +      else
> > > +         total_slices += mt->level[level].depth;
> > >
> >
> > The intention was always for the state map to use logical layers, not
> > physical.  There's no point in tracking fast-clear state for an
> individual
> > sample.  That said, that may not actually be quite correct with the
> current
> > implementation.
>
> Right, I was thinking the same. However, there are already quite a few
> things
> on the move and I thought leaving this for later. How would you feel
> addressing this after the transition to ISL?
>

One of the patches I sent fixes things so we start using logical layers for
everything.  I think I'd rather get this right up-front if that's ok with
you.


> >
> > --Jason
> >
> >
> > > +   }
> > >
> > >     const size_t per_level_array_size = levels * sizeof(enum
> isl_aux_state
> > > *);
> > >
> > > @@ -715,7 +721,16 @@ create_aux_state_map(struct intel_mipmap_tree *mt,
> > >     enum isl_aux_state *s = data + per_level_array_size;
> > >     for (uint32_t level = 0; level < levels; level++) {
> > >        per_level_arr[level] = s;
> > > -      for (uint32_t a = 0; a < mt->level[level].depth; a++)
> > > +
> > > +      unsigned level_depth;
> > > +      if (mt->surf.size > 0)
> > > +         level_depth = mt->surf.dim == ISL_SURF_DIM_3D ?
> > > +                          minify(mt->surf.phys_level0_sa.depth,
> level) :
> > > +                          mt->surf.phys_level0_sa.array_len;
> > > +      else
> > > +         level_depth = mt->level[level].depth;
> > > +
> > > +      for (uint32_t a = 0; a < level_depth; a++)
> > >           *(s++) = initial;
> > >     }
> > >     assert((void *)s == data + total_size);
> > > --
> > > 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/20170719/baadb3e8/attachment.html>


More information about the mesa-dev mailing list