gallivm/nir: fix f2b32

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
This commit is contained in:
Dave Airlie 2021-07-22 13:40:49 +10:00 committed by Marge Bot
parent 0776628d1d
commit 0d4f17fe1f

View file

@ -224,6 +224,8 @@ static LLVMValueRef flt_to_bool32(struct lp_build_nir_context *bld_base,
LLVMValueRef result = lp_build_cmp(flt_bld, PIPE_FUNC_NOTEQUAL, val, flt_bld->zero);
if (src_bit_size == 64)
result = LLVMBuildTrunc(builder, result, bld_base->int_bld.vec_type, "");
if (src_bit_size == 16)
result = LLVMBuildSExt(builder, result, bld_base->int_bld.vec_type, "");
return result;
}