ntt: remove dead input variables before lowering FS IO
authorGert Wollny <gert.wollny@collabora.com>
Sun, 24 Apr 2022 15:03:42 +0000 (17:03 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 27 Apr 2022 00:01:20 +0000 (00:01 +0000)
commite9797b648a0020f1d173ce7b8e483bc158d69a70
treec6d286e914be8b9676c94064fc14f5c267c276e4
parent47d3f7c69f52432566653834cde0f4fcbef408dd
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@arb_enhanced_layouts@execution@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@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16130>
src/gallium/auxiliary/nir/nir_to_tgsi.c
src/gallium/drivers/r600/ci/r600-turks-fails.txt