summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorTobias Droste <[email protected]>2017-11-08 10:44:19 +0100
committerMichel Dänzer <[email protected]>2017-11-08 10:44:19 +0100
commit5d61fa4e68b7eb6d481a37efdbb35fdce675a6ad (patch)
tree6210b5836b1da25bdda9f2d5aaa372ece35c5342 /src/gallium/auxiliary
parentd5a641106baae2122cc3f09b4a755077d902ee88 (diff)
gallivm: Use new LLVM fast-math-flags API
LLVM 6 changed the API on the fast-math-flags: https://reviews.llvm.org/rL317488 NOTE: This also enables the new flag 'ApproxFunc' to allow for approximations for library functions (sin, cos, ...). I'm not completly convinced, that this is something mesa should do. Signed-off-by: Tobias Droste <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index d988910a7eb..13194072902 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -830,7 +830,11 @@ lp_create_builder(LLVMContextRef ctx, enum lp_float_mode float_mode)
llvm::unwrap(builder)->setFastMathFlags(flags);
break;
case LP_FLOAT_MODE_UNSAFE_FP_MATH:
+#if HAVE_LLVM >= 0x0600
+ flags.setFast();
+#else
flags.setUnsafeAlgebra();
+#endif
llvm::unwrap(builder)->setFastMathFlags(flags);
break;
}