Mesa (main): ntt: remove dead input variables before lowering FS IO
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 27 00:31:42 UTC 2022
Module: Mesa
Branch: main
Commit: e9797b648a0020f1d173ce7b8e483bc158d69a70
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9797b648a0020f1d173ce7b8e483bc158d69a70
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Sun Apr 24 17:03:42 2022 +0200
ntt: remove dead input variables before lowering FS IO
Because for fragment shaders we still use the variables, and
lower_io_to_vector may leave dead variables that duplicate inputs
that are now vectorized, we have to call this pass, because otherwise
we will may hit the assertion
src/gallium/auxiliary/tgsi/tgsi_ureg.c:318:
ureg_DECL_fs_input_centroid_layout:
Assertion `(ureg->input[i].usage_mask & usage_mask) == 0'
This is relevant for
spec at arb_enhanced_layouts@execution at component-layout@*
on r600/ntt
Fixes: a4840e15ab77b44a72cabd7d503172e8357477eb
r600: Use nir-to-tgsi instead of TGSI when the NIR debug opt is disabled
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16130>
---
src/gallium/auxiliary/nir/nir_to_tgsi.c | 4 +++-
src/gallium/drivers/r600/ci/r600-turks-fails.txt | 9 ---------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c
index 8ddbf8a250c..4c3929e3fd4 100644
--- a/src/gallium/auxiliary/nir/nir_to_tgsi.c
+++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c
@@ -3752,8 +3752,10 @@ const void *nir_to_tgsi_options(struct nir_shader *s,
* corresponding splitting, and virgl depends on TGSI across link boundaries
* having matching declarations.
*/
- if (s->info.stage == MESA_SHADER_FRAGMENT)
+ if (s->info.stage == MESA_SHADER_FRAGMENT) {
NIR_PASS_V(s, nir_lower_indirect_derefs, nir_var_shader_in, UINT32_MAX);
+ NIR_PASS_V(s, nir_remove_dead_variables, nir_var_shader_in, NULL);
+ }
NIR_PASS_V(s, nir_lower_io, nir_var_shader_in | nir_var_shader_out,
type_size, (nir_lower_io_options)0);
diff --git a/src/gallium/drivers/r600/ci/r600-turks-fails.txt b/src/gallium/drivers/r600/ci/r600-turks-fails.txt
index 399a4c25574..d3a843c3ffd 100644
--- a/src/gallium/drivers/r600/ci/r600-turks-fails.txt
+++ b/src/gallium/drivers/r600/ci/r600-turks-fails.txt
@@ -768,15 +768,6 @@ spec at arb_depth_buffer_float@fbo-clear-formats stencil at GL_DEPTH32F_STENCIL8,Fail
spec at arb_draw_indirect@gl_vertexid used with gldrawarraysindirect,Fail
spec at arb_draw_indirect@gl_vertexid used with gldrawelementsindirect,Fail
-
-# "ureg_DECL_fs_input_centroid_layout: Assertion `(ureg->input[i].usage_mask & usage_mask) == 0' failed."
-spec at arb_enhanced_layouts@execution at component-layout@sso-vs-gs-fs-array-interleave,Crash
-spec at arb_enhanced_layouts@execution at component-layout@tcs-tes-fs-array-with-non-array-interleave,Crash
-spec at arb_enhanced_layouts@execution at component-layout@vs-tcs-tes-fs-array-interleave,Crash
-spec at arb_enhanced_layouts@execution at component-layout@vs-tcs-tes-fs-ifc-array-interleave,Crash
-spec at arb_enhanced_layouts@execution at component-layout@vs-tcs-tes-fs-patch-array-interleave,Crash
-spec at arb_enhanced_layouts@execution at component-layout@vs-to-fs-array-interleave,Crash
-
# " intrinsic copy_deref (ssa_2, ssa_3) (dst_access=0, src_access=0)
# error: glsl_get_bare_type(dst->type) == glsl_get_bare_type(src->type) (../src/compiler/nir/nir_validate.c:643)"
# since ntt copy-deref optimization, probably.
More information about the mesa-commit
mailing list