diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-07 16:30:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-07 18:54:26 +0300 |
commit | dc4d850d109f64bc0c56b53b9a50a8e9c70951fa (patch) | |
tree | d00045a484266bdf82fd09b4030cd3e1dfdc6b93 /intern/cycles/util/util_math_float4.h | |
parent | 9da7dfa1586dd89b918cffcfb04068a1e9a6343b (diff) |
Fix Windows build errors with recent Cycles SIMD refactoring.
Diffstat (limited to 'intern/cycles/util/util_math_float4.h')
-rw-r--r-- | intern/cycles/util/util_math_float4.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/util/util_math_float4.h b/intern/cycles/util/util_math_float4.h index adb9a76a434..57befea66c4 100644 --- a/intern/cycles/util/util_math_float4.h +++ b/intern/cycles/util/util_math_float4.h @@ -286,13 +286,14 @@ ccl_device_inline float4 reduce_add(const float4& a) return shuffle<2,3,0,1>(h) + h; # endif #else - return make_float4(((a.x + a.y) + (a.z + a.w))); + float sum = (a.x + a.y) + (a.z + a.w); + return make_float4(sum, sum, sum, sum); #endif } ccl_device_inline float average(const float4& a) { - return reduce_add(a)[0] * 0.25f; + return reduce_add(a).x * 0.25f; } ccl_device_inline float len(const float4& a) |