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 <brecht@blender.org>2021-03-08 15:59:16 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-03-08 16:14:49 +0300
commit2015e3984254a41d1f9f14ac854649aa132334ee (patch)
treed6d41e5fa1dab15386dc4cfc84b419d6e69aea5d
parent02948a2cab44f74ed101fc1b2ad9fe4431123e85 (diff)
Fix Cycles CUDA build error with Visual Studio 2019 v16.9blender-v2.92-release
Something in this update broke the floor() function in CUDA, instead use floorf() like we do everywhere else in the kernel code. Thanks to Ray Molenkamp for identifying the solution.
-rw-r--r--intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
index 82ad9225fc3..132653fa7ca 100644
--- a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
+++ b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
@@ -68,8 +68,8 @@ ccl_device T kernel_tex_image_interp_bicubic(const TextureInfo &info, float x, f
x = (x * info.width) - 0.5f;
y = (y * info.height) - 0.5f;
- float px = floor(x);
- float py = floor(y);
+ float px = floorf(x);
+ float py = floorf(y);
float fx = x - px;
float fy = y - py;
@@ -95,9 +95,9 @@ ccl_device T kernel_tex_image_interp_tricubic(const TextureInfo &info, float x,
y = (y * info.height) - 0.5f;
z = (z * info.depth) - 0.5f;
- float px = floor(x);
- float py = floor(y);
- float pz = floor(z);
+ float px = floorf(x);
+ float py = floorf(y);
+ float pz = floorf(z);
float fx = x - px;
float fy = y - py;
float fz = z - pz;
@@ -127,9 +127,9 @@ ccl_device T kernel_tex_image_interp_tricubic(const TextureInfo &info, float x,
template<typename T, typename S>
ccl_device T kernel_tex_image_interp_tricubic_nanovdb(S &s, float x, float y, float z)
{
- float px = floor(x);
- float py = floor(y);
- float pz = floor(z);
+ float px = floorf(x);
+ float py = floorf(y);
+ float pz = floorf(z);
float fx = x - px;
float fy = y - py;
float fz = z - pz;