diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-26 23:06:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-26 23:06:02 +0300 |
commit | 378a13483f95d3225570491b5e315cad904276bc (patch) | |
tree | 5fda66ff57c4749d73694c3a83f8043b9110f6af /intern | |
parent | c69d75e880575576c24fd6cd8fb03632227a5574 (diff) |
Fix T69185: Cycles kernel OpenCL compile error after recent changes
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/util/util_math.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index 9faf7149ce2..ebddd56bd40 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -619,12 +619,12 @@ ccl_device float bits_to_01(uint bits) ccl_device_inline uint count_leading_zeros(uint x) { - assert(x != 0); #if defined(__KERNEL_CUDA__) || defined(__KERNEL_OPTIX__) return __clz(x); #elif defined(__KERNEL_OPENCL__) return clz(x); #else + assert(x != 0); # ifdef _MSC_VER unsigned long leading_zero = 0; _BitScanReverse(&leading_zero, x); @@ -637,12 +637,12 @@ ccl_device_inline uint count_leading_zeros(uint x) ccl_device_inline uint count_trailing_zeros(uint x) { - assert(x != 0); #if defined(__KERNEL_CUDA__) || defined(__KERNEL_OPTIX__) return (__ffs(x) - 1); #elif defined(__KERNEL_OPENCL__) return (31 - count_leading_zeros(x & -x)); #else + assert(x != 0); # ifdef _MSC_VER unsigned long ctz = 0; _BitScanForward(&ctz, x); |