Created attachment 144082 [details]
Minimal SDL2 program that reproduces the problem
I filed this for i965, but the issue is in the shader compiler, so it also affects the Vulkan driver and, presumably, Iris.
The problem only happens when INTEL_DEBUG=do32 is used, in which case SDL2 generates a shader that hits the following assertion:
../src/intel/compiler/brw_fs.cpp:1745: void fs_visitor::assign_urb_setup(): Assertion `inst->src[i].offset < REG_SIZE / 2' failed.
I bisected the regression to this commit:
commit c0504569eac5e5c305e9f0c240e248aca9d8891f (HEAD -> master)
Author: Rafael Antognolli <email@example.com>
Date: Fri Oct 19 15:44:15 2018 -0700
intel/fs: Move the scalar-region conversion to the generator.
Move the scalar-region conversion from the IR to the generator, so it
doesn't affect the Gen11 path. We need the non-scalar regioning
for a later lowering pass that we are adding.
v2: Better commit message (Matt)
Reviewed-by: Matt Turner <firstname.lastname@example.org>
I am attaching a minimal SDL2 sample program that reproduces the problem.
*** Bug 110905 has been marked as a duplicate of this bug. ***
(In reply to Iago Toral from comment #0)
> I am attaching a minimal SDL2 sample program that reproduces the problem.
This is enough to reproduce: INTEL_DEBUG=do32 glxgears
Valgrind doesn't give any additional info, just abort backtrace (same as I got with systemd-coredump from Weston when enabling SIMD32 heuristics):
==5950== Process terminating with default action of signal 6 (SIGABRT): dumping core
==5950== at 0x48CE6A5: raise (in /usr/lib64/libc-2.29.so)
==5950== by 0x48AF860: abort (in /usr/lib64/libc-2.29.so)
==5950== by 0x48AF736: ??? (in /usr/lib64/libc-2.29.so)
==5950== by 0x48BF545: __assert_fail (in /usr/lib64/libc-2.29.so)
==5950== by 0x6BEBC7E: fs_visitor::assign_urb_setup() (brw_fs.cpp:1745)
==5950== by 0x6BFB847: fs_visitor::run_fs(bool, bool) (brw_fs.cpp:7664)
==5950== by 0x6BFD659: brw_compile_fs (brw_fs.cpp:8039)
==5950== by 0x66ED3FB: brw_codegen_wm_prog (brw_wm.c:123)
==5950== by 0x66EE44F: brw_fs_precompile (brw_wm.c:590)
==5950== by 0x66DADD3: brw_shader_precompile (brw_link.cpp:56)
==5950== by 0x66DADD3: brw_link_shader (brw_link.cpp:374)
==5950== by 0x68E9798: _mesa_glsl_link_shader (ir_to_mesa.cpp:3170)
==5950== by 0x6910023: create_new_program (ff_fragment_shader.cpp:1131)
==5950== by 0x6910023: _mesa_get_fixed_func_fragment_program (ff_fragment_shader.cpp:1161)