From feb2ba9e9b30db149d53ea164b472c87757f8b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Tue, 23 Apr 2024 16:31:16 +0200 Subject: [PATCH] ac/nir/tess: Slightly refactor emitting LS outputs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No functional changes, just reorganize the code a little bit in preparation for the next commits. Signed-off-by: Timur Kristóf Reviewed-by: Georg Lehmann Part-of: --- src/amd/common/ac_nir_lower_tess_io_to_mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 9c643b3fa2a..320b4d2c393 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 @@ -264,8 +264,8 @@ lower_ls_output_store(nir_builder *b, * * So writes to those outputs in VS-as-LS are simply ignored. */ - unsigned semantic = nir_intrinsic_io_semantics(intrin).location; - if (semantic == VARYING_SLOT_LAYER || semantic == VARYING_SLOT_VIEWPORT) { + const nir_io_semantics io_sem = nir_intrinsic_io_semantics(intrin); + if (io_sem.location == VARYING_SLOT_LAYER || io_sem.location == VARYING_SLOT_VIEWPORT) { nir_instr_remove(&intrin->instr); return true; } @@ -273,7 +273,7 @@ lower_ls_output_store(nir_builder *b, lower_tess_io_state *st = (lower_tess_io_state *) state; /* 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(semantic)) + if (st->tcs_temp_only_inputs & BITFIELD64_BIT(io_sem.location)) return false; b->cursor = nir_before_instr(&intrin->instr);