diff options
Diffstat (limited to 'intern/cycles/util/math.h')
-rw-r--r-- | intern/cycles/util/math.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/util/math.h b/intern/cycles/util/math.h index e7fc492733f..e4c7df6e44a 100644 --- a/intern/cycles/util/math.h +++ b/intern/cycles/util/math.h @@ -347,10 +347,15 @@ ccl_device_inline float smoothstep(float edge0, float edge1, float x) } #ifndef __KERNEL_CUDA__ -ccl_device_inline float saturate(float a) +ccl_device_inline float saturatef(float a) { return clamp(a, 0.0f, 1.0f); } +#else +ccl_device_inline float saturatef(float a) +{ + return __saturatef(a); +} #endif /* __KERNEL_CUDA__ */ ccl_device_inline int float_to_int(float f) |