[Bug 78468] Compiling of shader gets stuck in infinite loop
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Sep 10 03:05:00 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=78468
--- Comment #13 from Iago Toral <itoral at igalia.com> ---
FWIW, I can reproduce the problem with a simple fragment shader like this one:
#version 140
uniform sampler2D tex;
out vec4 FragColor;
void main()
{
vec4 col = texture(tex, vec2(0, 0)); // 1
for (int i=0; i<30; i++) // 2
col += vec4(0.1, 0.1, 0.1, 0.1); // 3
col = vec4(col.rgb/ 2.0, col.a); // 4
FragColor = col; // 5
}
Some things worth noting:
- The hang goes away if I only replace (1) by:
vec4 col = vec4(0, 0, 0, 0);
or even something like this
vec4 col = vec4(texture(tex, vec2(0, 0)).r, 0.0, 0.0, 0.0);
- The hang goes away if I only replace (4) by:
col = vec4(col.rgb, col.a);
- The hang goes away if we reduce the number of iterations in the loop below a
certain threshold. Actually, for some thresholds you can see that it seems to
hang, but will eventually finished after a few seconds. It just seems that the
time required to complete the constant_folding optimization pass grows
exponentially with the number of iterations in the cases where the test seems
to hang.
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20140910/49571c02/attachment.html>
More information about the intel-3d-bugs
mailing list