[Mesa-dev] Seeking advice speeding up glsl optimisation passes for AoA

Timothy Arceri t_arceri at yahoo.com.au
Thu Jul 16 07:16:37 PDT 2015


On Wed, 2015-07-15 at 11:53 -0700, Eric Anholt wrote:
> Timothy Arceri <t_arceri at yahoo.com.au> writes:
> 
> > Hi guys,
> > 
> > As I've mentioned a couple of times in previous patches some of the cts 
> > AoA
> > tests are taking very long time to compile. This is due to excessive
> > optimisation passes mainly in the glsl optimisations (there are some 
> > slowdowns
> > in the intel backend too but these seemed to go away when I tried the new 
> > nir
> > vec4 backend).
> > 
> > I fixed part of the problem with this patch to do the dead code 
> > elimination in
> > a single pass [1]. 
> > These excessive passes exist in normal shaders but its generally not an 
> > issue
> > as the number of passes is generally quite low, and inexpensive. However 
> > when
> > you have an 8 dimensional array constantly walking this becomes quite
> > expensive.
> > 
> > The remaining issue I'm seeking some advice for is with constant
> > propagation/folding.
> > 
> > It seems for interators used in loops you can get into a situation where 
> > an
> > optimisation pass is needed for each loop iteration in order to make all
> > values of the iterator constant.
> > 
> > I didn't have look too find some real world examples of this in the public
> > shader-db. For example here is it happening for a Unity shader:
> 
> How about if we just disable the GLSL IR constant prop pass when NIR is
> enabled?

Thanks for the suggestion, I was hoping that would be the answer but seems we
can't do it yet. However I seem to have a solution to my problem which was
quite simple in the end.




More information about the mesa-dev mailing list