Too many temporary expressions in shader freeze glLinkProgram
Submitted by Martina Kollarova
Assigned to Ian Romanick
Description
Created attachment 122206 glxinfo output
This bug is causing a webgl conformance test in Chromium to freeze and time out. https://bugs.chromium.org/p/chromium/issues/detail?id=593680
The shader contains something like:
temp += u_uniform + u_uniform - u_uniform / u_uniform * u_uniform + u_uniform - u_uniform / u_uniform * u_uniform + u_uniform - u_uniform ;
repeated 1000 times. It freezes forever (I waited 30 minutes) on glLinkProgram. It doesn't freeze if it's repeated only ~100 times. I created a small reproducer that uses approximately the same shaders as the test in Chromium: https://github.com/mkollaro/opengl_snippets, you can try it out with:
mkdir build && cd build && cmake .. && make && ./bin/shader_freeze
Attachment 122206, "glxinfo output":
glxinfo.txt
Version: 11.2