From a64408dcd5121d7bab74d43241ac035d5bf86cb4 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Mon, 28 Feb 2022 13:21:16 -0800 Subject: [PATCH] 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: --- src/freedreno/ci/freedreno-a630-fails.txt | 92 +++++++++++++++-------- src/freedreno/ir3/ir3_shader.h | 2 - 2 files changed, 59 insertions(+), 35 deletions(-) diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt index 53ad8041dc4..7d46889bdc5 100644 --- a/src/freedreno/ci/freedreno-a630-fails.txt +++ b/src/freedreno/ci/freedreno-a630-fails.txt @@ -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 diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index ea809893a15..9a94fce7019 100644 --- a/src/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h @@ -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; }