mesa: 169f9c030c16d1247a3a762972d8687d89a16750 (master) $ ./bin/shader_runner generated_tests/spec/glsl-1.30/execution/built-in-functions/fs-mix-float-float-bool.shader_test -auto src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1985:visit: Assertion `!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()"' failed. Trace/breakpoint trap (core dumped) (gdb) bt #0 0x00007f5d7a45b28e in _debug_assert_fail (expr=0x7f5d7af7bf28 "!\"Invalid ir opcode in glsl_to_tgsi_visitor::visit()\"", file=0x7f5d7af7b8b0 "src/mesa/state_tracker/st_glsl_to_tgsi.cpp", line=1985, function=0x7f5d7af7d02f <glsl_to_tgsi_visitor::visit(ir_expression*)::__FUNCTION__> "visit") at src/gallium/auxiliary/util/u_debug.c:278 #1 0x00007f5d7a32ce96 in glsl_to_tgsi_visitor::visit (this=0x26c8950, ir=0x26ca880) at src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1985 #2 0x00007f5d7a35d5ae in ir_expression::accept (this=0x26ca880, v=0x26c8950) at src/glsl/ir.h:1323 #3 0x00007f5d7a3286ba in glsl_to_tgsi_visitor::visit (this=0x26c8950, ir=0x26caf30) at src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1390 #4 0x00007f5d7a35d5ae in ir_expression::accept (this=0x26caf30, v=0x26c8950) at src/glsl/ir.h:1323 #5 0x00007f5d7a3286ba in glsl_to_tgsi_visitor::visit (this=0x26c8950, ir=0x26c9240) at src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1390 #6 0x00007f5d7a35d5ae in ir_expression::accept (this=0x26c9240, v=0x26c8950) at src/glsl/ir.h:1323 #7 0x00007f5d7a32e07d in glsl_to_tgsi_visitor::visit (this=0x26c8950, ir=0x26cafc0) at src/mesa/state_tracker/st_glsl_to_tgsi.cpp:2338 #8 0x00007f5d7a35d562 in ir_assignment::accept (this=0x26cafc0, v=0x26c8950) at src/glsl/ir.h:922 #9 0x00007f5d7a3279d4 in glsl_to_tgsi_visitor::visit (this=0x26c8950, ir=0x26c1140) at src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1219 #10 0x00007f5d7a35d4b2 in ir_function::accept (this=0x26c1140, v=0x26c8950) at src/glsl/ir.h:745 #11 0x00007f5d7a368e50 in visit_exec_list (list=0x26b7570, visitor=0x26c8950) at src/glsl/ir.cpp:1746 #12 0x00007f5d7a338e8e in get_mesa_program (ctx=0x7f5d7da32010, shader_program=0x24719a0, shader=0x26b73e0) at src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5061 #13 0x00007f5d7a33969c in st_link_shader (ctx=0x7f5d7da32010, prog=0x24719a0) at src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5287 #14 0x00007f5d7a209e8c in _mesa_glsl_link_shader (ctx=0x7f5d7da32010, prog=0x24719a0) at src/mesa/program/ir_to_mesa.cpp:3132 #15 0x00007f5d7a1c8926 in link_program (ctx=0x7f5d7da32010, program=3) at src/mesa/main/shaderapi.c:833 #16 0x00007f5d7a1c9ab4 in _mesa_LinkProgram (programObj=3) at src/mesa/main/shaderapi.c:1316 #17 0x00007f5d7d745b37 in stub_glLinkProgram (program=3) at piglit/tests/util/generated_dispatch.c:17556 #18 0x00000000004054c6 in link_and_use_shaders () at piglit/tests/shaders/shader_runner.c:757 #19 0x0000000000409093 in piglit_init (argc=2, argv=0x7fff610ad758) at piglit/tests/shaders/shader_runner.c:1962 #20 0x00007f5d7d720242 in run_test (gl_fw=0x7f5d7da0d320 <glut_fw>, argc=2, argv=0x7fff610ad758) at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:140 #21 0x00007f5d7d71e189 in piglit_gl_test_run (argc=2, argv=0x7fff610ad758, config=0x7fff610ad640) at piglit/tests/util/piglit-framework-gl.c:141 #22 0x0000000000403fb3 in main (argc=2, argv=0x7fff610ad758) at piglit/tests/shaders/shader_runner.c:57 (gdb) frame 1 #1 0x00007f5d7a32ce96 in glsl_to_tgsi_visitor::visit (this=0x26c8950, ir=0x26ca880) at src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1985 1985 assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()"); (gdb) l 1980 case ir_binop_vector_extract: 1981 case ir_triop_vector_insert: 1982 case ir_triop_csel: 1983 /* This operation is not supported, or should have already been handled. 1984 */ 1985 assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()"); 1986 break; 1987 } 1988 1989 this->result = result_src; (gdb) print ir->operation $1 = ir_triop_csel fd183fa02c4430e439faf6a5195f5008d34db987 is the first bad commit commit fd183fa02c4430e439faf6a5195f5008d34db987 Author: Matt Turner <mattst88@gmail.com> Date: Fri Sep 6 12:36:48 2013 -0700 glsl: Use conditional-select in mix(). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> :040000 040000 2e76899a27ccc0bd584d7265891f1a51862bf4ae 794c98855a3f3057af8e9cbb91c2dd10dd4f6590 M src bisect run success
Well crap, that was a think-o. We should implement these in GLSL-to-TGSI (will want to do so for ARB_gpu_shader5 builtins anyway) and GLSL-to-Mesa. Alternatively, we can revert this patch until then, but I suspect both are the same amount of worth, so probably best to just go ahead and implement it. Sorry about that.
Maybe I'm blind, but I don't see a SEL-like opcode in TGSI, so I'm not sure what to even translate it to. (Other than looking what gets generated for the old predicated MOVs and doing that...)
There's CMP and UCMP. The first wants a float input for comparison though (so should be used for hw not supporting ints), the latter should be used for hw which supports "true" ints/booleans (though it has some unresolved issues wrt if src2/src3 arguments are floats or not hence if you use src modifiers on them what happens is anyone's guess).
*** Bug 69592 has been marked as a duplicate of this bug. ***
mesa: 5a51c1b01a16d3256f9769a76d8293fea5853b1f (master) piglit fs-mix-float-float-bool passes now.
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.