[Mesa-dev] [PATCH v2] i965: Disable auxiliary buffers when there are self-dependencies.

Kenneth Graunke kenneth at whitecape.org
Sat Oct 7 23:49:57 UTC 2017


On Friday, October 6, 2017 10:25:50 PM PDT Kenneth Graunke wrote:
> On Friday, October 6, 2017 8:09:33 PM PDT Jason Ekstrand wrote:
> > On October 6, 2017 8:00:04 PM Kenneth Graunke <kenneth at whitecape.org> wrote:
[snip]
> > > diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c 
> > > b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > index 670a92c1168..48392e7494a 100644
> > > --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > @@ -2678,7 +2676,7 @@ intel_miptree_prepare_fb_fetch(struct brw_context *brw,
> > >                                 uint32_t start_layer, uint32_t num_layers)
> > >  {
> > >     intel_miptree_prepare_texture_slices(brw, mt, mt->surf.format, level, 1,
> > > -                                        start_layer, num_layers, NULL);
> > > +                                        start_layer, num_layers, false);
> > 
> > I think we probably want true here.  It is for fb_fetch after all.  :-)  
> > Also, we probably want to do disable_rb_aux_buffer for framebuffer fetch as 
> > well.
> 
> Sure, I can do that.  It won't actually do anything, however, as this is
> the code for non-coherent framebuffer fetch...and on Gen9+, we always do
> a coherent fetch using the Render Target Read messages (even if the app
> says that a non-coherent fetch would be fine).  And, Gen9+ is the only
> platform where CCS_E exists.  So, the only platforms where this matters
> don't use this code :)
> 
> Still, I think your suggestion would make the code clearer, and would
> future-proof it in case we ever decide that non-coherent fetches are
> useful on modern hardware (say, if they're cheaper someday).

Actually, now that I've tried it, this doesn't work.

It causes assertion failures in tests such as:

    ES31-CTS.functional.blend_equation_advanced.msaa.lighten

on Broadwell and older.  These try to do non-coherent framebuffer fetch
from a multisampled surface.  Making intel_miptree_prepare_fb_access
pass true for "disable_aux" causes us to pass ISL_AUX_USAGE_NONE into
intel_miptree_prepare_mcs_access().

That function asserts aux_usage is ISL_AUX_USAGE_MCS, because, as you
said, there's no code for doing full MCS resolves.

Because of that, and this probably not doing anything useful anyway,
I think I'd rather leave v2 as it is.  What do you think, Jason?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171007/2887b033/attachment.sig>


More information about the mesa-dev mailing list