ir3: Don't assert on not finding the VS output for an FS input.

It should return undefined data, not terminate the program.  Fixes some
piglit tests poking at the UB handling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15197>
This commit is contained in:
Emma Anholt 2022-02-28 13:21:16 -08:00 committed by Marge Bot
parent feb7e30e2d
commit a64408dcd5
2 changed files with 59 additions and 35 deletions

View file

@ -388,10 +388,8 @@ spec@glsl-1.50@execution@compatibility@clipping@vs-gs-clip-vertex-equal-to-posit
spec@glsl-1.50@execution@compatibility@clipping@vs-gs-clip-vertex-homogeneity,Crash
spec@glsl-1.50@execution@compatibility@clipping@vs-gs-clip-vertex-primitives-triangle-strip,Crash
# "src/freedreno/ir3/ir3_shader.h:864:ir3_find_output: Assertion `0' failed."
# Reading undefined vertex outputs should be undefined, not crash.
spec@glsl-1.50@execution@compatibility@gs-clamp-vertex-color,Crash
spec@glsl-1.50@execution@compatibility@gs-ff-frag,Crash
spec@glsl-1.50@execution@compatibility@gs-clamp-vertex-color,Fail
spec@glsl-1.50@execution@compatibility@gs-ff-frag,Fail
spec@glsl-1.50@execution@compatibility@gs-texcoord-array-2,Fail
spec@glsl-1.50@execution@compatibility@gs-texcoord-array,Fail
@ -553,37 +551,65 @@ spec@!opengl 1.4@gl-1.4-polygon-offset,Fail
spec@!opengl 2.0@gl-2.0-edgeflag,Crash
spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Crash
# "../src/freedreno/ir3/ir3_shader.h:843:ir3_find_output: Assertion `0' failed."
spec@!opengl 2.0@vertex-program-two-side back2,Crash
# "src/freedreno/ir3/ir3_nir_lower_tess.c:111: shader_io_get_unique_index: Assertion `!"illegal slot in get unique index\n"'"
spec@!opengl 2.0@vertex-program-two-side back back2,Crash
spec@!opengl 2.0@vertex-program-two-side back front2 back2,Fail
spec@!opengl 2.0@vertex-program-two-side back front2 back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side back front2,Fail
spec@!opengl 2.0@vertex-program-two-side back front2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side back,Crash
spec@!opengl 2.0@vertex-program-two-side back front2 back2,Crash
spec@!opengl 2.0@vertex-program-two-side back front2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled back back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled back,Crash
spec@!opengl 2.0@vertex-program-two-side enabled back front2 back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled back front2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front2 back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front back back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front back,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front back front2 back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front back front2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front front2 back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled front front2,Crash
spec@!opengl 2.0@vertex-program-two-side front2 back2,Crash
spec@!opengl 2.0@vertex-program-two-side front2,Crash
spec@!opengl 2.0@vertex-program-two-side front back2,Crash
spec@!opengl 2.0@vertex-program-two-side front back back2,Crash
spec@!opengl 2.0@vertex-program-two-side front back,Crash
spec@!opengl 2.0@vertex-program-two-side front back front2 back2,Crash
spec@!opengl 2.0@vertex-program-two-side front back front2,Crash
spec@!opengl 2.0@vertex-program-two-side front,Crash
spec@!opengl 2.0@vertex-program-two-side front front2 back2,Crash
spec@!opengl 2.0@vertex-program-two-side front front2,Crash
spec@!opengl 2.0@vertex-program-two-side back2,Crash
spec@!opengl 2.0@vertex-program-two-side enabled back back2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back front2 back2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back front2 back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back front2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back front2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back back2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back front2 back2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back front2 back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back front2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back front2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front front2 back2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front front2 back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front front2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front front2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front2 back2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front2 back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front2,Fail
spec@!opengl 2.0@vertex-program-two-side enabled front2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front back back2,Fail
spec@!opengl 2.0@vertex-program-two-side front back back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front back front2 back2,Fail
spec@!opengl 2.0@vertex-program-two-side front back front2 back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front back front2,Fail
spec@!opengl 2.0@vertex-program-two-side front back front2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front back,Fail
spec@!opengl 2.0@vertex-program-two-side front back@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front back2,Fail
spec@!opengl 2.0@vertex-program-two-side front back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front front2 back2,Fail
spec@!opengl 2.0@vertex-program-two-side front front2 back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front front2,Fail
spec@!opengl 2.0@vertex-program-two-side front front2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front,Fail
spec@!opengl 2.0@vertex-program-two-side front@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front2 back2,Fail
spec@!opengl 2.0@vertex-program-two-side front2 back2@gs-out and fs,Fail
spec@!opengl 2.0@vertex-program-two-side front2,Fail
spec@!opengl 2.0@vertex-program-two-side front2@gs-out and fs,Fail
spec@!opengl 2.1@pbo,Fail
spec@!opengl 2.1@pbo@test_polygon_stip,Fail

View file

@ -906,8 +906,6 @@ ir3_find_output(const struct ir3_shader_variant *so, gl_varying_slot slot)
if (so->outputs[j].slot == slot)
return j;
debug_assert(0);
return -1;
}