Created attachment 40803 [details] rt.frag Running raytracer from here (with some fixes to not be nvidia specific): https://ssl.davidsansome.com/svn/raytracer I get: raytracer: loop_analysis.cpp:141: virtual ir_visitor_status loop_analysis::visit(ir_loop_jump*): Assertion `!this->state.is_empty()' failed. Aborted Same with both r600c and r600g, with latest mesa git. This is a regression from 7.8.2, where I don't get the assert (only a syntax error). To reproduce run this using the attached rt.frag: $ src/glsl/glsl_compiler rt.frag glsl_compiler: loop_analysis.cpp:141: virtual ir_visitor_status loop_analysis::visit(ir_loop_jump*): Assertion `!this->state.is_empty()' failed.
mesa: 859106f196ade77f59f8787b071739901cd1a843 (master) (gdb) bt #0 0x00f63416 in __kernel_vsyscall () #1 0x00190941 in raise () from /lib/libc.so.6 #2 0x00193e42 in abort () from /lib/libc.so.6 #3 0x001898e8 in __assert_fail () from /lib/libc.so.6 #4 0x0807eec5 in loop_analysis::visit (this=0xbf97e454, ir=0x88620a8) at loop_analysis.cpp:141 #5 0x080719a8 in ir_loop_jump::accept (this=0x88620a8, v=0xbf97e454) at ir_hv_accept.cpp:105 #6 0x08071857 in visit_list_elements (v=0xbf97e454, l=0x88622a8) at ir_hv_accept.cpp:48 #7 0x080721e8 in ir_if::accept (this=0x8862290, v=0xbf97e454) at ir_hv_accept.cpp:366 #8 0x08071857 in visit_list_elements (v=0xbf97e454, l=0x88f5f30) at ir_hv_accept.cpp:48 #9 0x08071a1b in ir_function_signature::accept (this=0x88f5f08, v=0xbf97e454) at ir_hv_accept.cpp:120 #10 0x08071857 in visit_list_elements (v=0xbf97e454, l=0x88f61e8) at ir_hv_accept.cpp:48 #11 0x08071a87 in ir_function::accept (this=0x88f61d0, v=0xbf97e454) at ir_hv_accept.cpp:132 #12 0x08071857 in visit_list_elements (v=0xbf97e454, l=0x8572210) at ir_hv_accept.cpp:48 #13 0x080717c4 in ir_hierarchical_visitor::run (this=0xbf97e454, instructions=0x8572210) at ir_hierarchical_visitor.cpp:282 #14 0x0807f9e1 in analyze_loop_variables (instructions=0x8572210) at loop_analysis.cpp:495 #15 0x0806522e in do_common_optimization (ir=0x8572210, linked=false, max_unroll_iterations=32) at glsl_parser_extras.cpp:741 #16 0x0804c4fb in compile_shader (ctx=0xbf97e5f0, shader=0x856fe88) at main.cpp:221 #17 0x0804cab8 in main (argc=2, argv=0xbf994084) at main.cpp:307 (gdb) frame 4 #4 0x0807eec5 in loop_analysis::visit (this=0xbf97e454, ir=0x88620a8) at loop_analysis.cpp:141 141 assert(!this->state.is_empty()); *** This bug has been marked as a duplicate of bug 32031 ***
The commit that fixed bug #32031 made the original assertion go away. I hit a different assertion with same shader now: shader_runner: program/ir_to_mesa.cpp:2247: prog_src_register mesa_src_reg_from_ir_src_reg(ir_to_mesa_src_reg): Assertion `reg.index < (1 << 11)' failed. Here is a rt.shader_test file for piglit's shader_runner, rt.frag and rt.vert are attached to this bugreport: [require] GLSL >= 1.20 [vertex shader file] rt.vert [fragment shader file] rt.frag
Created attachment 40984 [details] rt.vert
This time I can't reproduce the assertion using glsl-compiler --link, only by using the GL API to link the shaders, for example with piglit's shader-runner.
(In reply to comment #4) > This time I can't reproduce the assertion using glsl-compiler --link, only by > using the GL API to link the shaders, for example with piglit's shader-runner. That makes sense. The new crash (which really should have been put in a new bug) happens during code generation. The stand-alone GLSL compiler doesn't do any code generation. It just compiles and links.
With a9fa0f3a (master or 7.10 branch) or 0ab166d5 (7.9 branch), does this still occur?
Answering my own question... this bug still occurs on master. The compile time is also unacceptable. Ugh.
EVE Online on wine also triggers this on entering the character creator (both r600c & r600g). "ExeFile.exe: program/ir_to_mesa.cpp:2281: prog_src_register mesa_src_reg_from_ir_src_reg(ir_to_mesa_src_reg): Assertion `reg.index < (1 << 11)' failed." mesa master 0b436cf511316d4bf90246a39557900b4b566853.
Gallium now uses st_glsl_to_tgsi rather than ir_to_mesa; i965 uses GLSL IR directly. So I doubt you'll be hitting this assertion any longer...
Reassigning to i915 as this is the only driver besides swrast that uses this code path anymore.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/687.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.