<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 19, 2017 at 6:57 AM, Pohjolainen, Topi <span dir="ltr"><<a href="mailto:topi.pohjolainen@gmail.com" target="_blank">topi.pohjolainen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Jul 18, 2017 at 02:11:59PM -0700, Jason Ekstrand wrote:<br>
> On Tue, Jul 18, 2017 at 1:46 AM, Topi Pohjolainen <<br>
> <a href="mailto:topi.pohjolainen@gmail.com">topi.pohjolainen@gmail.com</a>> wrote:<br>
><br>
> > Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
> > ---<br>
> > src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 21 ++++++++++++++++++---<br>
> > 1 file changed, 18 insertions(+), 3 deletions(-)<br>
> ><br>
> > diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> > b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> > index d96f5c7938..fafd0c1e59 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>
> > @@ -696,8 +696,14 @@ create_aux_state_map(struct intel_mipmap_tree *mt,<br>
> > const uint32_t levels = mt->last_level + 1;<br>
> ><br>
> > uint32_t total_slices = 0;<br>
> > - for (uint32_t level = 0; level < levels; level++)<br>
> > - total_slices += mt->level[level].depth;<br>
> > + for (uint32_t level = 0; level < levels; level++) {<br>
> > + if (mt->surf.size > 0)<br>
> > + total_slices += (mt->surf.dim == ISL_SURF_DIM_3D ?<br>
> > + minify(mt->surf.phys_level0_<wbr>sa.depth,<br>
> > level) :<br>
> > + mt->surf.phys_level0_sa.array_<wbr>len);<br>
> > + else<br>
> > + total_slices += mt->level[level].depth;<br>
> ><br>
><br>
> The intention was always for the state map to use logical layers, not<br>
> physical. There's no point in tracking fast-clear state for an individual<br>
> sample. That said, that may not actually be quite correct with the current<br>
> implementation.<br>
<br>
</div></div>Right, I was thinking the same. However, there are already quite a few things<br>
on the move and I thought leaving this for later. How would you feel<br>
addressing this after the transition to ISL?<br><div class="HOEnZb"><div class="h5"></div></div></blockquote><div><br></div><div>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.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
><br>
> --Jason<br>
><br>
><br>
> > + }<br>
> ><br>
> > const size_t per_level_array_size = levels * sizeof(enum isl_aux_state<br>
> > *);<br>
> ><br>
> > @@ -715,7 +721,16 @@ create_aux_state_map(struct intel_mipmap_tree *mt,<br>
> > enum isl_aux_state *s = data + per_level_array_size;<br>
> > for (uint32_t level = 0; level < levels; level++) {<br>
> > per_level_arr[level] = s;<br>
> > - for (uint32_t a = 0; a < mt->level[level].depth; a++)<br>
> > +<br>
> > + unsigned level_depth;<br>
> > + if (mt->surf.size > 0)<br>
> > + level_depth = mt->surf.dim == ISL_SURF_DIM_3D ?<br>
> > + minify(mt->surf.phys_level0_<wbr>sa.depth, level) :<br>
> > + mt->surf.phys_level0_sa.array_<wbr>len;<br>
> > + else<br>
> > + level_depth = mt->level[level].depth;<br>
> > +<br>
> > + for (uint32_t a = 0; a < level_depth; a++)<br>
> > *(s++) = initial;<br>
> > }<br>
> > assert((void *)s == data + total_size);<br>
> > --<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>
> ><br>
</div></div></blockquote></div><br></div></div>