aras-p/glsl-optimizer — pull request #57 by sunnyps (2014-04-16 02:10:25+00:00)
Title: Fix loop bugs

Some fixes for bugs while emitting for/while loops:

1. In some cases loop variables are never initialized. See loop-forunbounded and loop-forvariants test cases for example.

2. In some cases when a while loop wasn't emitted (due to loop analysis being incomplete for instance) the emitted GLSL would skip assignments / declarations of certain loop variables. See the newly added test case bug-loops-for-while for example.

Let me know if you have any questions.