diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-24 13:29:13 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-24 13:29:13 +0300 |
commit | e92e90c30e148bf216fbf9829cdc4a7058cfd6f8 (patch) | |
tree | 2167457877029e53aeef497da1fbee6bf357a306 /intern/cycles/kernel | |
parent | 9abc2dfa4933266b7f385b75c65527d512441363 (diff) |
Cycles: Fix wrong looking voronoi of second 2nd closest
Was only happening for release builds made with GCC-8. Probably some
optimization strtegy was confused by uninitialized variable.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/svm/svm_voronoi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/kernel/svm/svm_voronoi.h b/intern/cycles/kernel/svm/svm_voronoi.h index 75af910d940..4e66e87611f 100644 --- a/intern/cycles/kernel/svm/svm_voronoi.h +++ b/intern/cycles/kernel/svm/svm_voronoi.h @@ -32,6 +32,11 @@ ccl_device void voronoi_neighbors(float3 p, NodeVoronoiDistanceMetric distance, da[2] = 1e10f; da[3] = 1e10f; + pa[0] = make_float3(0.0f, 0.0f, 0.0f); + pa[1] = make_float3(0.0f, 0.0f, 0.0f); + pa[2] = make_float3(0.0f, 0.0f, 0.0f); + pa[3] = make_float3(0.0f, 0.0f, 0.0f); + int3 xyzi = quick_floor_to_int3(p); for(int xx = -1; xx <= 1; xx++) { |