"Dying Light" hangs system on Radeon 5700 XT with mesa master (c1a2ac2a) and llvm 11 (1e487e4c16821b6de3d651f618274df90bd3fad9) due to NGG
It crashes when displaying information about characters and locations being fictional (after techland logo).
Backtrace:
#0 0x00007f4132c912b0 in LLVMTypeOf () from /usr/lib/llvm/11/lib64/libLLVM-11git.so
#1 0x00007f4136bd0309 in si_build_wrapper_function (ctx=0x7f41297f78f0, parts=0x7f41297f7740, num_parts=4, main_part=1, next_shader_first_part=0) at ../mesa-9999/src/gallium/drivers/radeonsi/si_shader_llvm.c:736
#2 0x00007f4136bcba94 in si_llvm_compile_shader (sscreen=0x1f23a10, compiler=0x1f24858, shader=0x2e1264e0, debug=0x0, nir=0x7f41040836e0, free_nir=true) at ../mesa-9999/src/gallium/drivers/radeonsi/si_shader.c:1782
#3 0x00007f4136bcc679 in si_compile_shader (sscreen=0x1f23a10, compiler=0x1f24858, shader=0x2e1264e0, debug=0x0) at ../mesa-9999/src/gallium/drivers/radeonsi/si_shader.c:2000
#4 0x00007f4136bcdcd2 in si_create_shader_variant (sscreen=0x1f23a10, compiler=0x1f24858, shader=0x2e1264e0, debug=0x0) at ../mesa-9999/src/gallium/drivers/radeonsi/si_shader.c:2577
#5 0x00007f4136c03b06 in si_build_shader_variant (shader=0x2e1264e0, thread_index=0, low_priority=true) at ../mesa-9999/src/gallium/drivers/radeonsi/si_state_shaders.c:2203
#6 0x00007f4136c03c03 in si_build_shader_variant_low_priority (job=0x2e1264e0, thread_index=0) at ../mesa-9999/src/gallium/drivers/radeonsi/si_state_shaders.c:2228
#7 0x00007f4137244b74 in util_queue_thread_func (input=0x1f2d4f0) at ../mesa-9999/src/util/u_queue.c:292
#8 0x00007f4137243f6e in impl_thrd_routine (p=0x1f2d510) at ../mesa-9999/include/c11/threads_posix.h:87
#9 0x00007f41428db3d7 in start_thread (arg=<optimized out>) at pthread_create.c:479
#10 0x00007f413b817eff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
It seems that the assert at src/gallium/drivers/radeonsi/si_shader_llvm.c:729 is not fulfilled: out_idx + param_size is 50, while num_out is 49.