nir/lower_int64: Fix lowering of f2[ui]64 for 16-bit float

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
This commit is contained in:
Jason Ekstrand 2020-10-26 23:09:04 -05:00 committed by Marge Bot
parent 70b4524de5
commit da331f814f
1 changed files with 1 additions and 1 deletions

View File

@ -776,7 +776,7 @@ lower_f2(nir_builder *b, nir_ssa_def *x, bool dst_is_signed)
nir_ssa_def *res = nir_pack_64_2x32_split(b, res_lo, res_hi);
if (dst_is_signed)
res = nir_bcsel(b, nir_flt(b, x_sign, nir_imm_float(b, 0)),
res = nir_bcsel(b, nir_flt(b, x_sign, nir_imm_floatN_t(b, 0, x->bit_size)),
nir_ineg(b, res), res);
return res;