[Mesa-dev] [PATCH 5/6] i965/gen9: Set HALIGN_16 for all aux buffers

Ben Widawsky ben at bwidawsk.net
Thu Jun 4 15:32:46 PDT 2015


On Fri, May 29, 2015 at 05:06:09PM -0700, Chad Versace wrote:
> On Thu 28 May 2015, Ben Widawsky wrote:
> > Just like the previous patch, but for the GEN9 constraints.
> > 
> > Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> > ---
> >  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > index a1ac0cf..89030aa 100644
> > --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > @@ -655,6 +655,11 @@ intel_miptree_create(struct brw_context *brw,
> >  
> >     assert((layout_flags & MIPTREE_LAYOUT_DISABLE_AUX) == 0);
> >     assert((layout_flags & MIPTREE_LAYOUT_FOR_BO) == 0);
> > +
> > +   if (brw->gen >= 9 && num_samples > 1)
> > +      layout_flags |= MIPTREE_LAYOUT_FORCE_HALIGN16;
> > +
> 
> The commit subject says this change applies to "all aux buffers", and
> does not mention non-aux buffers. But the patch applies HALIGN16 to
> a large set of non-aux buffers: all multisample buffers. Should the
> patch's code be fixed to agree with the commit subject, or the converse?

Hmm. I don't think this is what I meant to send out.

To answer your question, it's meant for any buffer which is have anything other
than AUX_NONE in the render surface state. My understanding is that applies to:
(please correct me if I am wrong)
1. Multisample buffers
2. AUX buffers
3. Surfaces being fast cleared.

I think there are more to add to this list when we enable Jordan's AUX buffer
support, but for now I think that's all.

Anyway, I think the check should be:
if (brw->gen >= 9 && (is_fast_clear_capable || num_samples > 1))

Also in hindsight, I need to rework this a bit. I think it should just be using
the check from the previous patch in create_layout and not at miptree create.
I'll send out a v2 with that...


More information about the mesa-dev mailing list