ac/nir: don't write TCS outputs to memory if no_varying is set

nir_opt_varyings() will set this, making it unnecessary to look
at the TES input mask.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
This commit is contained in:
Marek Olšák
2023-12-26 09:44:17 -05:00
committed by Marge Bot
parent 4880c1e12e
commit af4e91f6b8

View File

@@ -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