pan/bi: Fix LD_VAR_BUF indirect offset calculations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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: 0fcddd4d2c ("pan/bi: Rework varying linking on Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
(cherry picked from commit 83f90b0760)
This commit is contained in:
Faith Ekstrand 2025-11-28 19:45:13 -05:00 committed by Dylan Baker
parent a3b0070415
commit 95f11b74f5
2 changed files with 2 additions and 2 deletions

View file

@ -244,7 +244,7 @@
"description": "pan/bi: Fix LD_VAR_BUF indirect offset calculations",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0fcddd4d2c401a7678139456702cbe15288eebf1",
"notes": null

View file

@ -692,7 +692,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);