[Mesa-dev] [PATCH] Revert "intel/nir: Call nir_lower_io_to_scalar_early"

Jason Ekstrand jason at jlekstrand.net
Wed Aug 15 23:00:37 UTC 2018


On Wed, Aug 15, 2018 at 5:36 PM Timothy Arceri <tarceri at itsqueeze.com>
wrote:

> On 16/08/18 02:10, Jason Ekstrand wrote:
> > On Tue, Aug 14, 2018 at 7:25 PM Timothy Arceri <tarceri at itsqueeze.com
> > <mailto:tarceri at itsqueeze.com>> wrote:
> >
> >     On 09/08/18 05:05, Jason Ekstrand wrote:
> >      > Commit 4434591bf56a6b0 caused substantially more URB messages in
> >      > geometry and tessellation shaders.  Before we can really enable
> this
> >      > sort of optimization,  We either need some way of combining them
> back
> >      > together into vectors or we need to do cross-stage vector element
> >      > elimination without splitting everything into scalars.
> >
> >     You should be calling:
> >
> >     nir_compact_varyings() after remove_unused_varyings this should do
> most
> >     of what you want.
> >
> >
> > Does that turn things back into vectors?  The problem we're hitting is
> > not that things aren't compacted, it's that we want to read/write whole
> > vectors at a time as much as possible.  Just reverting the patch isn't
> > quite the proper solution because we want to be able to compact things
> > and it would be nice if we could load two variables at a time if they're
> > packed side-by-side in one vec4.  However, it does solve the perf
> > regression for now.
>
> Yes. nir_compact_varyings() compacts everything into vec4s. The only
> thing it doesn't currently do is compact the locations (the nir->llvm
> pass does this for radeonsi anyway).
>

I think I was unclear.  nir_compact_varyings does pack things tightly but
it doesn't turn each set of 4 scalar vars into a single vec4 var which is
what we would need in order for it to fix the perf problem caused by these
patches.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180815/ea3e92ed/attachment.html>


More information about the mesa-dev mailing list