From 1f80394c67a845c30c2c00795433db08dcad7199 Mon Sep 17 00:00:00 2001 From: Lorenzo Rossi Date: Wed, 1 Apr 2026 19:16:14 +0200 Subject: [PATCH] pan/compiler/lower_fs_inputs: Do not trust slot->alu_type pan_varying_layout contains both layout and format, in lower_fs_inputs though the layout is referring to the VS layout and the format might differ from what the FS layout expects. We cannot use the VS format as FS format otherwise we risk interpolating an integer. Fixes: 66bee415ad9 ("pan/compiler: Split lower_varyings_io into fs_inputs and vs_outputs") Signed-off-by: Lorenzo Rossi Reviewed-by: Christoph Pillmayer Reviewed-by: Erik Faye-Lund Part-of: --- src/panfrost/compiler/pan_nir_lower_fs_inputs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/panfrost/compiler/pan_nir_lower_fs_inputs.c b/src/panfrost/compiler/pan_nir_lower_fs_inputs.c index 2914fb43f18..8ed30b35a7a 100644 --- a/src/panfrost/compiler/pan_nir_lower_fs_inputs.c +++ b/src/panfrost/compiler/pan_nir_lower_fs_inputs.c @@ -62,18 +62,17 @@ lower_fs_input_load(struct nir_builder *b, nir_def *res; if (use_ld_var_buf) { - const nir_alu_type src_type = slot->alu_type; nir_def *offset_B = nir_imm_int(b, slot->offset); if (load->intrinsic == nir_intrinsic_load_interpolated_input) { res = nir_load_var_buf_pan(b, load_comps, load->def.bit_size, offset_B, &bary->def, - .src_type = src_type, + .src_type = dest_type, .io_semantics = sem); } else { res = nir_load_var_buf_flat_pan(b, load_comps, load->def.bit_size, offset_B, - .src_type = src_type, + .src_type = dest_type, .io_semantics = sem); } } else {