From dff88a92a470181c8ae82d1266eb610fca4521e0 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 18 Mar 2019 16:36:55 +0100 Subject: 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. --- intern/cycles/kernel/kernel_compat_opencl.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'intern') 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 */ -- cgit v1.2.3