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

Eric Anholt eric at anholt.net
Wed Jul 15 11:53:11 PDT 2015


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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150715/a0ffff6a/attachment.sig>


More information about the mesa-dev mailing list