Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-18 18:36:55 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-18 18:39:57 +0300
commitdff88a92a470181c8ae82d1266eb610fca4521e0 (patch)
tree3cc34eb1aaa253bdaf87babaf0e8cdd53627a4ef /intern
parent8162a6c51d28b09791977c9009f79b9a204bb346 (diff)
Fix AMD OpenCL build error after recent changes.
Always use native function since this was already the case due to __CL_USE_NATIVE__ not being defined in time, and seems to have caused no known issues.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_compat_opencl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h
index 3bf8cdebf4a..d3d0934a626 100644
--- a/intern/cycles/kernel/kernel_compat_opencl.h
+++ b/intern/cycles/kernel/kernel_compat_opencl.h
@@ -125,7 +125,9 @@
#define fmodf(x, y) fmod((float)(x), (float)(y))
#define sinhf(x) sinh(((float)(x)))
-#if !(defined(__KERNEL_OPENCL_AMD__) || defined(__KERNEL_OPENCL_INTEL_CPU__))
+/* Use native functions with possibly lower precision for performance,
+ * no issues found so far. */
+#if 1
# define sinf(x) native_sin(((float)(x)))
# define cosf(x) native_cos(((float)(x)))
# define tanf(x) native_tan(((float)(x)))
@@ -140,7 +142,7 @@
# define expf(x) exp(((float)(x)))
# define sqrtf(x) sqrt(((float)(x)))
# define logf(x) log(((float)(x)))
-# define rcp(x) recip(x))
+# define rcp(x) recip(x)
#endif
/* data lookup defines */