Mesa (master): nir/lower_int64: Fix lowering of f2[ui]64 for 16-bit float
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 22 19:12:48 UTC 2021
Module: Mesa
Branch: master
Commit: da331f814fd4a487e0e738c1395d3e3a00c215e3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=da331f814fd4a487e0e738c1395d3e3a00c215e3
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Mon Oct 26 23:09:04 2020 -0500
nir/lower_int64: Fix lowering of f2[ui]64 for 16-bit float
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
---
src/compiler/nir/nir_lower_int64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_lower_int64.c b/src/compiler/nir/nir_lower_int64.c
index 049aca61272..28a80012559 100644
--- a/src/compiler/nir/nir_lower_int64.c
+++ b/src/compiler/nir/nir_lower_int64.c
@@ -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;
More information about the mesa-commit
mailing list