gallivm: Use nextafterf(0.5, 0.0) as rounding constant
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_arit.c
index f348833206bcc3c1ef2637ba70635069b027e4ce..c050bfdb936dbd5b6495f6ae717e6fdaf900b788 100644 (file)
@@ -2477,7 +2477,7 @@ lp_build_iround(struct lp_build_context *bld,
    else {
       LLVMValueRef half;
 
-      half = lp_build_const_vec(bld->gallivm, type, 0.5);
+      half = lp_build_const_vec(bld->gallivm, type, nextafterf(0.5, 0.0));
 
       if (type.sign) {
          LLVMTypeRef vec_type = bld->vec_type;