From 83f90b0760bd355cd77316711da73f7c7ec33567 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 28 Nov 2025 19:45:13 -0500 Subject: [PATCH] pan/bi: Fix LD_VAR_BUF indirect offset calculations We multiply by 16 correctly but then drop that in the case where vbase is non-zero. We typically lower FS input indirects so we don't see this often but there are a few cases where they still sneak through. Fixes: 0fcddd4d2c40 ("pan/bi: Rework varying linking on Valhall") Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/ci/panfrost-g610-fails.txt | 1 - src/panfrost/compiler/bifrost/bifrost_compile.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/panfrost/ci/panfrost-g610-fails.txt b/src/panfrost/ci/panfrost-g610-fails.txt index 5a357ffa0fc..82e9aeab94c 100644 --- a/src/panfrost/ci/panfrost-g610-fails.txt +++ b/src/panfrost/ci/panfrost-g610-fails.txt @@ -215,7 +215,6 @@ spec@ext_transform_feedback@tessellation triangle_strip flat_last,Fail spec@ext_transform_feedback@tessellation triangle_strip monochrome,Fail spec@ext_transform_feedback@tessellation triangle_strip smooth,Fail spec@ext_transform_feedback@tessellation triangle_strip wireframe,Fail -spec@glsl-1.10@execution@variable-indexing@fs-input-array-vec4-index-rd,Fail spec@glsl-1.20@execution@fs-underflow-mul-compare-zero,Fail spec@glsl-1.30@execution@clipping@fs-clip-distance-interpolated,Crash spec@glsl-1.30@execution@interpolation@interpolation-noperspective-gl_backcolor-flat-distance,Fail diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index 6e281284db3..bdc8fcdb7b9 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -694,7 +694,7 @@ bi_emit_load_vary(bi_builder *b, nir_intrinsic_instr *instr) unsigned vbase = bi_varying_base_bytes(b->shader, instr); if (vbase != 0) - idx_bytes = bi_iadd_u32(b, idx, bi_imm_u32(vbase), false); + idx_bytes = bi_iadd_u32(b, idx_bytes, bi_imm_u32(vbase), false); bi_ld_var_buf_to(b, sz, dest, src0, idx_bytes, regfmt, sample, source_format, update, vecsize);