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:05:30 +0300
commit052156a646a2b5a045dabc13d76a269ef35381a9 (patch)
tree91a8aab4612a00441126d681a9a3f79fbb257b1e
parent2833f2b9bfa2bc9610ec8782f349fdfa1763fc3f (diff)
Fix Cycles CUDA build error with Visual Studio 2019 v16.9
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.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
index 1d425d132a1..eff1784cda0 100644
--- a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
+++ b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
@@ -66,8 +66,8 @@ kernel_tex_image_interp_bicubic(const TextureInfo &info, CUtexObject tex, float
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;
@@ -91,9 +91,9 @@ ccl_device T kernel_tex_image_interp_bicubic_3d(
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;