From 44925a142e2fe8067a693887f576c06623f160d2 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 18 Dec 2022 12:01:15 -0500 Subject: [PATCH] agx: Use metadata for VS varying linking Rather than variables. This gets rid of all backend nir_variable use. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_compile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 2fdfaeee9a7..6415da85a95 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -1802,10 +1802,10 @@ agx_remap_varyings_vs(nir_shader *nir, struct agx_varyings_vs *varyings) varyings->slots[VARYING_SLOT_POS] = base; base += 4; - nir_foreach_shader_out_variable(var, nir) { - unsigned loc = var->data.location; - - if (loc == VARYING_SLOT_POS || loc == VARYING_SLOT_PSIZ) + u_foreach_bit64(loc, nir->info.outputs_written) + { + if (loc == VARYING_SLOT_POS || loc == VARYING_SLOT_PSIZ || + loc == VARYING_SLOT_CLIP_DIST0 || loc == VARYING_SLOT_CLIP_DIST1) continue; varyings->slots[loc] = base;