[Mesa-users] unhandled operation nir_op_fdot3 in do_alu_action() in gallium/auxiliary/gallivm/lp_bld_nir.c

Viatcheslav Sysoltsev Viatcheslav.Sysoltsev at h-d-gmbh.de
Thu May 27 06:41:17 UTC 2021


Hi,

I'm supporting a very old opengl-based programm and since latest OS update I got crash during old-style picking (through glRenderMode(GL_SELECT)). I've managed to compose quite small example with glut, it is attached. To compile and run:

> g++ test.cpp `pkgconf --cflags --libs glut glu gl` -g -O0 && a.out

When you click on the rectangle the program crashes. The stacktrace of crash is:

(gdb) bt
#0  0x00007ffff0a87432 in LLVMBuildBitCast () from /usr/lib/libLLVM-11.so
#1  0x00007ffff6146f90 in visit_alu (bld_base=<optimized out>, instr=0x5555556a3700) at ../mesa-21.1.1/src/gallium/auxiliary/gallivm/lp_bld_nir.c:1016
#2  0x00007ffff6afb1ab in visit_block (block=0x5555556964e0, block=0x5555556964e0, bld_base=0x7fffffff7a20) at ../mesa-21.1.1/src/gallium/auxiliary/gallivm/lp_bld_nir.c:2140
#3  visit_cf_list.isra.1 (bld_base=bld_base at entry=0x7fffffff7a20, list=<optimized out>, list=<optimized out>) at ../mesa-21.1.1/src/gallium/auxiliary/gallivm/lp_bld_nir.c:2200
#4  0x00007ffff611d669 in lp_build_nir_llvm (nir=<optimized out>, bld_base=0x7fffffff7a20) at ../mesa-21.1.1/src/gallium/auxiliary/gallivm/lp_bld_nir.c:2293
#5  lp_build_nir_soa (gallivm=<optimized out>, shader=<optimized out>, params=<optimized out>, outputs=<optimized out>) at ../mesa-21.1.1/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c:2443
#6  0x00007ffff60b2b00 in generate_vs (bld_mask=0x7fffffff84d0, clamp_vertex_color=1 '\001', draw_image=0x5555556bfdf0, draw_sampler=0x5555556bfd40, context_ptr=0x5555555c02c0, system_values=0x7fffffff86c0, inputs=0x7fffffff9bf0, outputs=0x7fffffff91f0, vs_type=..., builder=0x5555556a68d0, variant=0x55555568f010) at ../mesa-21.1.1/src/gallium/auxiliary/draw/draw_llvm.c:973
#7  draw_llvm_generate (llvm=0x5555556e55e0, variant=<optimized out>) at ../mesa-21.1.1/src/gallium/auxiliary/draw/draw_llvm.c:2287
#8  0x00007ffff60bfcf5 in draw_llvm_create_variant (key=0x7fffffffb290, num_inputs=2, llvm=0x5555556e55e0) at ../mesa-21.1.1/src/gallium/auxiliary/draw/draw_llvm.c:909
#9  llvm_middle_end_prepare (middle=<optimized out>, in_prim=<optimized out>, opt=<optimized out>, max_vertices=<optimized out>) at ../mesa-21.1.1/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c:399
#10 0x00007ffff6071f76 in vsplit_prepare (frontend=0x5555556cda90, in_prim=<optimized out>, middle=<optimized out>, opt=<optimized out>) at ../mesa-21.1.1/src/gallium/auxiliary/draw/draw_pt_vsplit.c:229
#11 0x00007ffff6b01486 in draw_pt_arrays.isra.0 (draw=draw at entry=0x5555556b5090, prim=7, draw_info=draw_info at entry=0x7fffffffbf40, num_draws=num_draws at entry=1) at ../mesa-21.1.1/src/gallium/auxiliary/draw/draw_pt.c:129
#12 0x00007ffff60617a5 in draw_instances (draw=draw at entry=0x5555556b5090, info=info at entry=0x7fffffffbf50, draws=draws at entry=0x7fffffffbf40, num_draws=num_draws at entry=1) at ../mesa-21.1.1/src/gallium/auxiliary/draw/draw_pt.c:495
#13 0x00007ffff606b639 in draw_vbo (draw=0x5555556b5090, info=0x7fffffffbf50, indirect=<optimized out>, draws=0x7fffffffbf40, num_draws=1) at ../mesa-21.1.1/src/gallium/auxiliary/draw/draw_pt.c:619
#14 0x00007ffff5c44643 in st_feedback_draw_vbo (ctx=<optimized out>, prims=<optimized out>, nr_prims=<optimized out>, ib=<optimized out>, index_bounds_valid=<optimized out>, primitive_restart=<optimized out>, restart_index=<optimized out>, min_index=<optimized out>, max_index=<optimized out>, num_instances=<optimized out>, base_instance=<optimized out>) at ../mesa-21.1.1/src/mesa/state_tracker/st_draw_feedback.c:461
#15 0x00007ffff5cf12cb in _mesa_draw_gallium_fallback (ctx=0x7fffec3e6010, info=0x7fffec423270, draws=0x7fffec423298, num_draws=1) at ../mesa-21.1.1/src/mesa/main/draw.c:1004
#16 0x00007ffff5ce4713 in _mesa_draw_gallium_complex_fallback (ctx=0x7fffec3e6010, info=0x7fffec423270, draws=0x7fffec423298, mode=0x7fffec423498 "\a", base_vertex=0x0, num_draws=1) at ../mesa-21.1.1/src/mesa/main/draw.c:1087
#17 0x00007ffff5dff1ec in vbo_exec_vtx_flush (exec=0x7fffec421b60) at ../mesa-21.1.1/src/mesa/vbo/vbo_exec_draw.c:336
#18 0x00007ffff5dff565 in vbo_exec_FlushVertices_internal.part.0.lto_priv.0 (exec=0x7fffec421b60, flags=<optimized out>) at ../mesa-21.1.1/src/mesa/vbo/vbo_exec_api.c:685
#19 0x00007ffff5d4814c in vbo_exec_FlushVertices_internal (flags=1, exec=0x7fffec421b60) at ../mesa-21.1.1/src/mesa/vbo/vbo_exec_api.c:1101
#20 vbo_exec_FlushVertices (flags=1, ctx=0x7fffec3e6010) at ../mesa-21.1.1/src/mesa/vbo/vbo_exec_api.c:1119
#21 pop_matrix (stack=0x7fffec3fbc20, ctx=0x7fffec3e6010) at ../mesa-21.1.1/src/mesa/main/matrix.c:381
#22 _mesa_PopMatrix () at ../mesa-21.1.1/src/mesa/main/matrix.c:409
#23 0x00005555555555a9 in draw_block (colorInfill=16711680, x=-0.300000012, y=0, z=-2) at test.cpp:42
#24 0x000055555555560e in gl_draw () at test.cpp:54
#25 0x0000555555555873 in gl_select (x=213, y=220) at test.cpp:114
#26 0x0000555555555910 in mousedw (x=213, y=180, but=0) at test.cpp:127
#27 0x0000555555555945 in mouseClick (button=0, state=0, x=213, y=180) at test.cpp:131
#28 0x00007ffff7f187f9 in fgPlatformProcessSingleEvent () from /usr/lib/libglut.so.3
#29 0x00007ffff7f107f0 in glutMainLoopEvent () from /usr/lib/libglut.so.3
#30 0x00007ffff7f10938 in glutMainLoop () from /usr/lib/libglut.so.3
#31 0x00005555555559d3 in main (argc=1, argv=0x7fffffffe528) at test.cpp:145

Would mesa be built in debug mode, I would get assert(0) in do_alu_action (src/gallium/auxiliary/gallivm/lp_bld_nir.c:518), since the operation nir_op_fdot3 is not supported in the switch there and the function returns an uninitialized pointer. Is is a bug in Mesa, should it be reported? I haven't used opengl for over decade, so I'm quite newbie in the corner :/

// latest Archlinux, x86_64, Nvidia Quadro NVS 295 with nouveau driver. Mesa 21.1.1-1.

With best regards, Slava

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 3536 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20210527/d38d4725/attachment.cpp>


More information about the mesa-users mailing list