From dc4dbe2f4fce65d4a294cef1c5948df8a2b0d518 Mon Sep 17 00:00:00 2001 From: Lorenzo Rossi Date: Thu, 30 Apr 2026 18:22:37 +0200 Subject: [PATCH] pan/bi: Vectorize f2f16 on v10 and earlier Signed-off-by: Lorenzo Rossi Reviewed-by: Lars-Ivar Hesselberg Simonsen --- src/panfrost/compiler/bifrost/bifrost_nir.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/panfrost/compiler/bifrost/bifrost_nir.c b/src/panfrost/compiler/bifrost/bifrost_nir.c index 2fef5f4c834..e2772d2c755 100644 --- a/src/panfrost/compiler/bifrost/bifrost_nir.c +++ b/src/panfrost/compiler/bifrost/bifrost_nir.c @@ -124,7 +124,8 @@ bi_vectorize_filter(const nir_instr *instr, const void *data) case nir_op_ball_iequal4: case nir_op_bany_inequal2: case nir_op_bany_inequal3: - case nir_op_bany_inequal4: return 1; + case nir_op_bany_inequal4: + return 1; case nir_op_pack_uvec2_to_uint: case nir_op_pack_uvec4_to_uint: return 0; @@ -137,12 +138,16 @@ bi_vectorize_filter(const nir_instr *instr, const void *data) case nir_op_extract_i16: case nir_op_insert_u16: return 1; - /* On v11+, we lost all packed F16 conversions */ case nir_op_f2f16: case nir_op_f2f16_rtz: case nir_op_f2f16_rtne: case nir_op_u2f16: case nir_op_i2f16: + /* On v10 and earlier we can take 2 32-bit floats as srcs, while on v11+ + * we lost all packed F16 conversions. + */ + return (pan_arch(gpu_id) >= 11) ? 1 : 2; + /* On v11+, we lost packed 16-bit frexp_* */ case nir_op_frexp_sig: case nir_op_frexp_exp: if (pan_arch(gpu_id) >= 11)