From 13acc889af60360502a33e98f40ae39979ca60a8 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 17 Nov 2025 13:06:11 -0800 Subject: [PATCH] brw: Use io_sem.location instead of base to get varying slots Alyssa noted we can be using semantic IO here rather than relying on bases not having been remapped. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/brw/brw_nir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw/brw_nir.c b/src/intel/compiler/brw/brw_nir.c index 76caa544fd6..97adb66955b 100644 --- a/src/intel/compiler/brw/brw_nir.c +++ b/src/intel/compiler/brw/brw_nir.c @@ -440,7 +440,7 @@ remap_patch_urb_offsets_instr(nir_builder *b, nir_intrinsic_instr *intrin, void io_sem.location == VARYING_SLOT_TESS_LEVEL_OUTER)) return false; - gl_varying_slot varying = nir_intrinsic_base(intrin); + gl_varying_slot varying = io_sem.location; int vue_slot = vue_map->varying_to_slot[varying]; assert(vue_slot != -1); @@ -739,7 +739,8 @@ brw_nir_lower_vue_inputs(nir_shader *nir, * VARYING_SLOT_LAYER [.y], VARYING_SLOT_VIEWPORT [.z], and * VARYING_SLOT_PSIZ [.w]. */ - int varying = nir_intrinsic_base(intrin); + nir_io_semantics io_sem = nir_intrinsic_io_semantics(intrin); + gl_varying_slot varying = io_sem.location; int vue_slot; switch (varying) { case VARYING_SLOT_PSIZ: