From 609c46cf23996d9f1f12ce45fd390b78addedd29 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Sat, 24 Jan 2026 17:24:54 +0100 Subject: [PATCH] nir/lower_alu_width: emit f2f32 for unpack_half_2x16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_lower_alu_width.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir_lower_alu_width.c b/src/compiler/nir/nir_lower_alu_width.c index 04377ab0402..704818a9fab 100644 --- a/src/compiler/nir/nir_lower_alu_width.c +++ b/src/compiler/nir/nir_lower_alu_width.c @@ -279,10 +279,10 @@ lower_alu_instr_width(nir_builder *b, nir_instr *instr, void *_data) if (!b->shader->options->lower_unpack_half_2x16) return NULL; - nir_def *packed = nir_ssa_for_alu_src(b, alu, 0); + nir_def *unpacked = nir_unpack_32_2x16(b, nir_ssa_for_alu_src(b, alu, 0)); return nir_vec2(b, - nir_unpack_half_2x16_split_x(b, packed), - nir_unpack_half_2x16_split_y(b, packed)); + nir_f2f32(b, nir_channel(b, unpacked, 0)), + nir_f2f32(b, nir_channel(b, unpacked, 1))); } case nir_op_pack_uvec2_to_uint: {