ac/nir/tess: Don't emit VS outputs that aren't read by TCS.

This is necessary to prevent a regression from a future commit,
in order to allow us to map output locations differently.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29812>
This commit is contained in:
Timur Kristóf
2024-07-16 14:02:49 +02:00
committed by Marge Bot
parent b5f53fdf32
commit 9aa5c38e8d
@@ -271,6 +271,12 @@ lower_ls_output_store(nir_builder *b,
lower_tess_io_state *st = (lower_tess_io_state *) state;
/* When a VS output isn't read by TCS, don't emit anything. */
if ((io_sem.no_varying || !(st->tcs_inputs_read & BITFIELD64_BIT(io_sem.location)))) {
nir_instr_remove(&intrin->instr);
return true;
}
/* If this is a temp-only TCS input, we don't need to use shared memory at all. */
if (st->tcs_temp_only_inputs & BITFIELD64_BIT(io_sem.location))
return false;