r600/sfn: lower unpack_half to f2f32

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39511>
This commit is contained in:
Georg Lehmann 2026-01-24 19:18:20 +01:00 committed by Marge Bot
parent e5e7fc17f9
commit e267a3cda2

View file

@ -39,9 +39,9 @@ Lower2x16::lower(nir_instr *instr)
switch (alu->op) {
case nir_op_unpack_half_2x16: {
nir_def *packed = 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_def *lo = nir_u2u16(b, packed);
nir_def *hi = nir_u2u16(b, nir_ushr_imm(b, packed, 16));
return nir_vec2(b, nir_f2f32(b, lo), nir_f2f32(b, hi));
}
case nir_op_pack_half_2x16: {
nir_def *src_vec2 = nir_ssa_for_alu_src(b, alu, 0);