ParaLLEl N64 crashes radeonsi and llvmpipe
The Retroarch ParaLLEl-N64 core with it's default OpenGL renderer crashes both radeonsi and llvmpipe on start-up. It works with the proprietary OpenGL driver form amdgpu-pro 20.10. It hits the following assertion with a debug build:
mesa/main/uniform_query.cpp:1030: void _mesa_flush_vertices_for_uniforms(gl_context*, const gl_uniform_storage*): Assertion `index < MESA_SHADER_STAGES' failed.
Running Retroarch through GDB yields the following backtrace:
Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
_mesa_uniform (location=5, count=count@entry=1, values=values@entry=0x7fffedb79af0, ctx=0x555557265cb0, shProg=0x555557ebbdb0, basicType=basicType@entry=GLSL_TYPE_FLOAT,
src_components=4) at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/mesa/main/uniform_query.cpp:1102
1102 assert(uni->array_elements > 0 || location == (int)uni->remap_location);
(gdb) bt
#0 _mesa_uniform (location=5, count=count@entry=1, values=values@entry=0x7fffedb79af0, ctx=0x555557265cb0, shProg=0x555557ebbdb0, basicType=basicType@entry=GLSL_TYPE_FLOAT,
src_components=4) at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/mesa/main/uniform_query.cpp:1102
#1 0x00007fffe4828c69 in _mesa_Uniform4f (location=<optimized out>, v0=<optimized out>, v1=<optimized out>, v2=<optimized out>, v3=<optimized out>)
at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/mesa/main/uniforms.c:220
#2 0x00007fffd2533b64 in ?? () from /home/oschowa/.config/retroarch/cores/parallel_n64_libretro.so
I recorded an apitrace with amdgpu-pro, which replays fine on radeonsi, but maybe it's still useful: https://drive.google.com/open?id=19Jm-rJw94jAhpqjjUDUzyyW7fK7ZP2RQ
This happens on at least Mesa 20.0.0, 20.0.7 and current master. I'm running Arch Linux and my GPU is a RX580.
How to reproduce:
- Install Retroarch and let it download the the "Nintendo N64 ParaLLEl N64" core with it's online updater.
- Launch any N64 game using this core in it's default configuration.
- Observe the crash.