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:
authorWilliam Leeson <leesonw>2021-10-27 14:28:13 +0300
committerWilliam Leeson <william@blender.org>2021-10-27 15:05:46 +0300
commit7b1c5712f888ea37bbccafd9ffd7a3a6a61e665f (patch)
tree659551f820d8b70fe1c37ac6a8711fcd73cd7434 /intern/cycles/kernel/util
parent18b6f0d0f18732a071b75ad56a2475c383d19111 (diff)
Cycles: Replace saturate with saturatef
saturate is depricated in favour of __saturatef this replaces saturate with __saturatef on CUDA by createing a saturatef function which replaces all instances of saturate and are hooked up to the correct function on all platforms. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13010
Diffstat (limited to 'intern/cycles/kernel/util')
-rw-r--r--intern/cycles/kernel/util/lookup_table.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/util/lookup_table.h b/intern/cycles/kernel/util/lookup_table.h
index 2c26e668d7b..3ffbb4856da 100644
--- a/intern/cycles/kernel/util/lookup_table.h
+++ b/intern/cycles/kernel/util/lookup_table.h
@@ -22,7 +22,7 @@ CCL_NAMESPACE_BEGIN
ccl_device float lookup_table_read(KernelGlobals kg, float x, int offset, int size)
{
- x = saturate(x) * (size - 1);
+ x = saturatef(x) * (size - 1);
int index = min(float_to_int(x), size - 1);
int nindex = min(index + 1, size - 1);
@@ -39,7 +39,7 @@ ccl_device float lookup_table_read(KernelGlobals kg, float x, int offset, int si
ccl_device float lookup_table_read_2D(
KernelGlobals kg, float x, float y, int offset, int xsize, int ysize)
{
- y = saturate(y) * (ysize - 1);
+ y = saturatef(y) * (ysize - 1);
int index = min(float_to_int(y), ysize - 1);
int nindex = min(index + 1, ysize - 1);