[Bf-blender-cvs] [a4bbce89491] master: Cycles: Fix compilation error on NVidia OpenCL after recent refactor

Sergey Sharybin noreply at git.blender.org
Mon Aug 7 20:53:19 CEST 2017


Commit: a4bbce894914837c65f06f466f40e0cc1db7acb9
Author: Sergey Sharybin
Date:   Mon Aug 7 20:52:24 2017 +0200
Branches: master
https://developer.blender.org/rBa4bbce894914837c65f06f466f40e0cc1db7acb9

Cycles: Fix compilation error on NVidia OpenCL after recent refactor

Still need to verify this is proper thing to do for AMD OpenCL. At least now
i can compile OpenCL kernel on my laptop with sm21 card.

===================================================================

M	intern/cycles/kernel/kernel_compat_opencl.h

===================================================================

diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h
index 4836c290312..ece99b4313a 100644
--- a/intern/cycles/kernel/kernel_compat_opencl.h
+++ b/intern/cycles/kernel/kernel_compat_opencl.h
@@ -129,6 +129,7 @@
 #  define expf(x) native_exp(((float)(x)))
 #  define sqrtf(x) native_sqrt(((float)(x)))
 #  define logf(x) native_log(((float)(x)))
+#  define rcp(x)  native_recip(x)
 #else
 #  define sinf(x) sin(((float)(x)))
 #  define cosf(x) cos(((float)(x)))
@@ -136,6 +137,7 @@
 #  define expf(x) exp(((float)(x)))
 #  define sqrtf(x) sqrt(((float)(x)))
 #  define logf(x) log(((float)(x)))
+#  define rcp(x)  recip(x))
 #endif
 
 /* data lookup defines */




More information about the Bf-blender-cvs mailing list