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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-26 23:06:02 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-26 23:06:02 +0300
commit378a13483f95d3225570491b5e315cad904276bc (patch)
tree5fda66ff57c4749d73694c3a83f8043b9110f6af
parentc69d75e880575576c24fd6cd8fb03632227a5574 (diff)
Fix T69185: Cycles kernel OpenCL compile error after recent changes
-rw-r--r--intern/cycles/util/util_math.h4
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);