Attached patch fixes crash in GLSL loop analysis when some of the loop's controls (e.g. "from") can not be determined.<div><br></div><div>This happens on a shader like this (there's another loop between counter initialization & loop):</div>
<div><br></div><div><div>void main() {</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>float a = 0.0;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int k = 0;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for (int i = 0; i < 3; ++i)</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>a += 1.0;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for ( ; k < 3; ++k)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>a += 3.0;</div>
<div> gl_FragColor = vec4(a);</div><div>}</div><div><br></div><br>-- <br>Aras Pranckevičius<br>work: <a href="http://unity3d.com">http://unity3d.com</a><br>home: <a href="http://aras-p.info">http://aras-p.info</a><br>
</div><div><br></div>