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

Timothy Arceri tarceri at itsqueeze.com
Wed Aug 15 22:36:20 UTC 2018


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).

> 
> --Jason


More information about the mesa-dev mailing list