https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #9 from Marek Olšák maraeo@gmail.com 2010-09-11 14:34:19 PDT --- Thanks. I am pretty sure the GLSL compiler fails to unroll a loop.
Also can you try recent Mesa git? IIRC the loop unrolling for the new compiler was merged on the 3rd September.