r600/sfn: Don't rewrite TESS_EVAL inner tess level outputs
authorGert Wollny <gert.wollny@collabora.com>
Wed, 31 May 2023 15:45:03 +0000 (17:45 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 8 Jun 2023 08:32:16 +0000 (08:32 +0000)
Fixes: 5cd3e3950 (r600/sfn: Make sure all components are usable when lowering TF inputs)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23518>

src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp

index 32ef562..68dc657 100644 (file)
@@ -456,7 +456,7 @@ r600_lower_tess_io_impl(nir_builder *b, nir_instr *instr, enum mesa_prim prim_ty
       tf->src[0] = nir_src_for_ssa(addr_outer);
       nir_ssa_dest_init(&tf->instr, &tf->dest, tf->num_components, 32);
       nir_builder_instr_insert(b, &tf->instr);
-      if (ncomps < 4) {
+      if (ncomps < 4 && b->shader->info.stage != MESA_SHADER_TESS_EVAL) {
          auto undef = nir_ssa_undef(b, 1, 32);
          nir_ssa_def *srcs[4] = {undef, undef, undef, undef};
          for (unsigned i = 0; i < ncomps; ++i)