On Mon, 30 Jan 2012 07:40:15 +0100, Mathias Fröhlich <mathias.froehl...@gmx.net> wrote: > > Hi, > > I am trying to make the shaders from a sky scattering shader work with mesa. > One of the problems is that the shader contains a nested 16 x 32 loop with an > instruction intensive body. The glsl loop unrolling pass is trying to unroll > both loops since both of them have a fixed size <=32. Compiling this shader > gets stuck in do_common_optimization (= takes more than 10 minutes) since > unrolling and then optimizing that huge 16*32*(function body) intruction > count > kills the runtime behavour of other optimization passes. > > Attached is a change that additionally skips loop unrolling if either the > loop > is a nested loop or the instruction count of the body times the constant > iteration count exceeds the former max iteration count times 5 instructions. > This makes the above shaders at least compile within the usual fraction of a > second. > > Comments/Review?
Does this also fix our piglit tests for the bug? If so, note it in the commit message, and Reviewed-by: Eric Anholt <e...@anholt.net>
pgpFCvn7rpPD7.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev