-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hangs in glsl_test and glsl_compiler #44
Comments
Here's a sample backtrace from glsl_test: behdad:glsl-optimizer 130 (master)$ gdb --args ./glsl_test tests/ <http://go/gdb-home FAQ: http://go/gdb-faq Email: gdb-team IRC: gdb> ** running vertex tests for OpenGL ES 2.0... |
I am getting this same hanging behavior in Linux with the current HEAD of master. The odd thing is that through bisecting, I see successful test behavior in changeset 8828115, which was committed October 9, 2014, 10 months after this issue was submitted. So something was broken, then fixed again, then broken again? |
I have explored this further.... all of this is with NDEBUG undefined. tests pass in debug builds ( I instrumented glsl to print the input names it was failing on... it was 87 of them, but not all. I looked in a simple one, mat3 xll_constructMat3( mat4 m) {
// FAILS return mat3( vec3( m[0]), vec3( m[1]), vec3( m[2]));
// FAILS return mat3( vec3( m[0]), vec3( m[1]), vec3( m[2]));
// THIS PASSES
return mat3( vec3(1,1,1), vec3(1,1,1), vec3(1,1,1));
} Beyond simple build / platform issues, I'm not familiar with the glsl-optimizer code So I'm not sure where to go from here... The existing code is probably depending on a particular default initialization or something, and is getting lucky with how clang or MSVC deals with it... or gcc has some problem? in the meantime, it might be best to make the regular release be unoptimized, since this is generally an offline tool? The 485 tests on my MacBook Air pass in 3.9 seconds in |
It was a deep dive down a rabbit hole, but it ended up being the "optimize_split_arrays" optimization step that was causing the hang. After lots more digging, it came that an over-aggressively optimized-out loop was causing the infinite loop. https://github.com/neomantra/glsl-optimizer/blob/9bffe9de3d58912edc1766b7d3da8780540c3d91/src/glsl/opt_array_splitting.cpp So maybe it was a gcc problem after all? [I'm definitely not a fan of the mesa containers though.] I submitted a changeset that fixes it. |
Let's say "it attempts to solve the root of the problem rather than its symptoms". I'm not sure it's correctly correct, but it at least keeps my version of GCC from breaking the code when optimizing. I sent a more thorough patch upstream, see https://bugs.freedesktop.org/show_bug.cgi?id=91320 for details. |
I just had the same issue, would it be possible to merge the upstream patch ? |
When I build and try to run "glsl_test tests/" or glsl_compiler on my own shader, the thing keeps working and never finishes.
Sample:
$ ./glsl_test tests/
** running vertex tests for OpenGL ES 2.0...
top shows that glsl_test is consuming 100% CPU, but never returns. Memory usage is stable. Same with glsl_compiler.
The text was updated successfully, but these errors were encountered: