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/svm/image.h
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/svm/image.h')
-rw-r--r--intern/cycles/kernel/svm/image.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/svm/image.h b/intern/cycles/kernel/svm/image.h
index 6ddf98a6ef1..2ebd3d4eb87 100644
--- a/intern/cycles/kernel/svm/image.h
+++ b/intern/cycles/kernel/svm/image.h
@@ -167,17 +167,17 @@ ccl_device_noinline void svm_node_tex_image_box(KernelGlobals kg,
/* in case of blending, test for mixes between two textures */
if (N.z < (1.0f - limit) * (N.y + N.x)) {
weight.x = N.x / (N.x + N.y);
- weight.x = saturate((weight.x - 0.5f * (1.0f - blend)) / blend);
+ weight.x = saturatef((weight.x - 0.5f * (1.0f - blend)) / blend);
weight.y = 1.0f - weight.x;
}
else if (N.x < (1.0f - limit) * (N.y + N.z)) {
weight.y = N.y / (N.y + N.z);
- weight.y = saturate((weight.y - 0.5f * (1.0f - blend)) / blend);
+ weight.y = saturatef((weight.y - 0.5f * (1.0f - blend)) / blend);
weight.z = 1.0f - weight.y;
}
else if (N.y < (1.0f - limit) * (N.x + N.z)) {
weight.x = N.x / (N.x + N.z);
- weight.x = saturate((weight.x - 0.5f * (1.0f - blend)) / blend);
+ weight.x = saturatef((weight.x - 0.5f * (1.0f - blend)) / blend);
weight.z = 1.0f - weight.x;
}
else {