From af4e91f6b8b89763b2d436283f2cd4bf82c1a1ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 26 Dec 2023 09:44:17 -0500 Subject: [PATCH] ac/nir: don't write TCS outputs to memory if no_varying is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nir_opt_varyings() will set this, making it unnecessary to look at the TES input mask. Reviewed-by: Qiang Yu Reviewed-by: Timur Kristóf Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/amd/common/ac_nir_lower_tess_io_to_mem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_lower_tess_io_to_mem.c b/src/amd/common/ac_nir_lower_tess_io_to_mem.c index 2e28c28315d..c7565e49979 100644 --- a/src/amd/common/ac_nir_lower_tess_io_to_mem.c +++ b/src/amd/common/ac_nir_lower_tess_io_to_mem.c @@ -183,7 +183,9 @@ tcs_output_needs_vmem(nir_intrinsic_instr *intrin, ? st->tes_inputs_read : st->tes_patch_inputs_read; - return match_mask(MESA_SHADER_TESS_CTRL, intrin, mask, true); + /* no_varying indicates that TES doesn't read the output. */ + return !nir_intrinsic_io_semantics(intrin).no_varying && + match_mask(MESA_SHADER_TESS_CTRL, intrin, mask, true); } static bool