From a6f750dd4148b1c2549150128ee0c21db30039b6 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 20 Jul 2018 19:07:35 +0200 Subject: [PATCH 1/2] Fix T54455, T56053, T55564: Cycles OpenCL build error after recent changes. --- intern/cycles/kernel/svm/svm_voronoi.h | 3 ++- intern/cycles/util/util_math_float3.h | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/intern/cycles/kernel/svm/svm_voronoi.h b/intern/cycles/kernel/svm/svm_voronoi.h index e5e350bf76a..75af910d940 100644 --- a/intern/cycles/kernel/svm/svm_voronoi.h +++ b/intern/cycles/kernel/svm/svm_voronoi.h @@ -52,7 +52,7 @@ ccl_device void voronoi_neighbors(float3 p, NodeVoronoiDistanceMetric distance, case NODE_VORONOI_CHEBYCHEV: d = max3(fabs(vp - p)); break; - case NODE_VORONOI_MINKOWSKI: + case NODE_VORONOI_MINKOWSKI: { float3 n = fabs(vp - p); if(e == 0.5f) { d = sqr(reduce_add(sqrt(n))); @@ -61,6 +61,7 @@ ccl_device void voronoi_neighbors(float3 p, NodeVoronoiDistanceMetric distance, d = powf(reduce_add(pow3(n, e)), 1.0f/e); } break; + } } /* To keep the shortest four distances and associated points we have to keep them in sorted order. */ diff --git a/intern/cycles/util/util_math_float3.h b/intern/cycles/util/util_math_float3.h index ba1c117cdea..75265c1c9a2 100644 --- a/intern/cycles/util/util_math_float3.h +++ b/intern/cycles/util/util_math_float3.h @@ -280,11 +280,6 @@ ccl_device_inline float3 sqrt(const float3& a) #endif } -ccl_device_inline float3 pow3(const float3& a, float e) -{ - return make_float3(powf(a.x, e), powf(a.y, e), powf(a.z, e)); -} - ccl_device_inline float3 mix(const float3& a, const float3& b, float t) { return a + t*(b - a); @@ -382,6 +377,11 @@ ccl_device_inline bool isequal_float3(const float3 a, const float3 b) #endif } +ccl_device_inline float3 pow3(float3 v, float e) +{ + return make_float3(powf(v.x, e), powf(v.y, e), powf(v.z, e)); +} + ccl_device_inline float3 exp3(float3 v) { return make_float3(expf(v.x), expf(v.y), expf(v.z)); From 7232b0cbe51865653fdb3ea6b968345dd8fbc525 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Sun, 22 Jul 2018 16:02:28 -0600 Subject: [PATCH 2/2] make.bat : fix typo pointed out by anchpop on irc. --- build_files/windows/autodetect_msvc.cmd | 2 +- build_files/windows/check_libraries.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build_files/windows/autodetect_msvc.cmd b/build_files/windows/autodetect_msvc.cmd index 77dc005cd18..4dbe009a890 100644 --- a/build_files/windows/autodetect_msvc.cmd +++ b/build_files/windows/autodetect_msvc.cmd @@ -10,5 +10,5 @@ echo Compiler Detection failed. Use verbose switch for more information. exit /b 1 :DetectionComplete -echo Compiler Detection successfull, detected VS%BUILD_VS_YEAR% +echo Compiler Detection successful, detected VS%BUILD_VS_YEAR% exit /b 0 \ No newline at end of file diff --git a/build_files/windows/check_libraries.cmd b/build_files/windows/check_libraries.cmd index 6ad1d1749c3..90c50293720 100644 --- a/build_files/windows/check_libraries.cmd +++ b/build_files/windows/check_libraries.cmd @@ -36,7 +36,7 @@ if NOT EXIST %BUILD_VS_LIBDIR% ( echo. echo Error: Download of external libraries failed. echo This is needed for building, please manually run 'svn cleanup' and 'svn update' in - echo %BUILD_VS_LIBDIR% , until this is resolved you CANNOT make a successfull blender build + echo %BUILD_VS_LIBDIR% , until this is resolved you CANNOT make a successful blender build echo. exit /b 1 )