seg-fault with soft fp64 on iris after register allocation change
I believe d4a4cd20 (!14189 (merged)) is regressing the iris driver with soft64.
If I run:
$ INTEL_DEBUG=soft64 bin/shader_runner generated_tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-inverse-dmat4.shader_test -auto -fbo
I am able to reproduce a seg-fault on hardware with fp64 support. (And, without the env override on hardware without fp64.)
gdb gives a backtrace of:
Thread 3 "shader_run:sh0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffeace0640 (LWP 258090)]
0x00007ffff6311b4a in ra_test_adjacency_bit (g=0x7fff8ef899a0, n1=50272, n2=0) at ../../../mesa/src/util/register_allocate.c:494
494 return BITSET_TEST(g->adjacency, index);
(gdb) bt
#0 0x00007ffff6311b4a in ra_test_adjacency_bit (g=0x7fff8ef899a0, n1=50272, n2=0) at ../../../mesa/src/util/register_allocate.c:494
#1 0x00007ffff6312358 in ra_add_node_interference (g=0x7fff8ef899a0, n1=50272, n2=0) at ../../../mesa/src/util/register_allocate.c:639
#2 0x00007ffff5851e0d in fs_reg_alloc::setup_live_interference (this=0x7fffeacdf5c0, node=50272, node_start_ip=35021, node_end_ip=35023) at ../../../mesa/src/intel/compiler/brw_fs_reg_allocate.cpp:491
#3 0x00007ffff5853c84 in fs_reg_alloc::alloc_spill_reg (this=0x7fffeacdf5c0, size=1, ip=35022) at ../../../mesa/src/intel/compiler/brw_fs_reg_allocate.cpp:984
#4 0x00007ffff585447a in fs_reg_alloc::spill_reg (this=0x7fffeacdf5c0, spill_reg=354) at ../../../mesa/src/intel/compiler/brw_fs_reg_allocate.cpp:1082
#5 0x00007ffff5854a8f in fs_reg_alloc::assign_regs (this=0x7fffeacdf5c0, allow_spilling=true, spill_all=false) at ../../../mesa/src/intel/compiler/brw_fs_reg_allocate.cpp:1219
#6 0x00007ffff5854dbf in fs_visitor::assign_regs (this=0x7fffdc787620, allow_spilling=true, spill_all=false) at ../../../mesa/src/intel/compiler/brw_fs_reg_allocate.cpp:1255
#7 0x00007ffff581120c in fs_visitor::allocate_registers (this=0x7fffdc787620, allow_spilling=true) at ../../../mesa/src/intel/compiler/brw_fs.cpp:8775
#8 0x00007ffff58125a2 in fs_visitor::run_fs (this=0x7fffdc787620, allow_spilling=true, do_rep_send=false) at ../../../mesa/src/intel/compiler/brw_fs.cpp:9160
#9 0x00007ffff5813b87 in brw_compile_fs (compiler=0x5555555fba90, mem_ctx=0x7fffdc000b90, params=0x7fffeacdfa20) at ../../../mesa/src/intel/compiler/brw_fs.cpp:9695
#10 0x00007ffff51f5c7c in iris_compile_fs (screen=0x5555555fa710, uploader=0x555555610840, dbg=0x7fffffffb950, ish=0x55555dd6d440, shader=0x555557451260, vue_map=0x0)
at ../../../mesa/src/gallium/drivers/iris/iris_program.c:2000
#11 0x00007ffff51f75d8 in iris_compile_shader (_job=0x555555c05b90, _gdata=0x0, thread_index=0) at ../../../mesa/src/gallium/drivers/iris/iris_program.c:2566
#12 0x00007ffff466da0e in util_queue_thread_func (input=0x5555555ff2a0) at ../../../mesa/src/util/u_queue.c:313
#13 0x00007ffff466c561 in impl_thrd_routine (p=0x5555555fb310) at ../../../mesa/include/c11/threads_posix.h:87
#14 0x00007ffff70cdeae in start_thread (arg=0x7fffeace0640) at pthread_create.c:463
#15 0x00007ffff7ce5a5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
If I revert d4a4cd20, the seg-fault does not occur.
Cc: @konstantin.lazukin, @anholt, @idr
Edited by Jordan Justen