From 38b58e286fa5b972a43fd43cb01151ce112c10cc Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 13 Jan 2025 19:00:25 -0800 Subject: [PATCH] brw/nir: Fix source handling of nir_intrinsic_load_barycentric_at_offset The source of nir_intrinsic_load_barycentric_at_offset is a vector, so -1 should be passed to get_nir_src. This is also done for texture sampling intrinsics. I skimmed the other user of get_nir_src, and I believe they are correct. This one was just missed as LNL support landed an many, many rebases of the original MR occurred. v2: Fix another get_nir_src call. Suggested by Lionel. Reviewed-by: Paulo Zanoni [v1] Reviewed-by: Kenneth Graunke Fixes: d5d7ae22ae4 ("brw/nir: Fix up handling of sources that might be convergent vectors") Closes: #12464 Part-of: --- src/intel/compiler/brw_from_nir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_from_nir.cpp b/src/intel/compiler/brw_from_nir.cpp index 414440bab9d..7a2dab8bce3 100644 --- a/src/intel/compiler/brw_from_nir.cpp +++ b/src/intel/compiler/brw_from_nir.cpp @@ -4493,7 +4493,7 @@ brw_from_nir_emit_fs_intrinsic(nir_to_brw_state &ntb, if (devinfo->ver >= 20) { emit_pixel_interpolater_alu_at_offset( bld, dest, - retype(get_nir_src(ntb, instr->src[0]), BRW_TYPE_F), + retype(get_nir_src(ntb, instr->src[0], -1), BRW_TYPE_F), interpolation); } else if (nir_const_value *const_offset = nir_src_as_const_value(instr->src[0])) { @@ -4539,7 +4539,7 @@ brw_from_nir_emit_fs_intrinsic(nir_to_brw_state &ntb, if (bary_intrin == nir_intrinsic_load_barycentric_at_offset || bary_intrin == nir_intrinsic_load_barycentric_at_sample) { /* Use the result of the PI message. */ - dst_xy = retype(get_nir_src(ntb, instr->src[0]), BRW_TYPE_F); + dst_xy = retype(get_nir_src(ntb, instr->src[0], -1), BRW_TYPE_F); } else { /* Use the delta_xy values computed from the payload */ enum intel_barycentric_mode bary = brw_barycentric_mode(