diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-12-20 16:25:45 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-12-20 16:25:45 +0400 |
commit | 40259cfe7bf8ab3fa844d87b61096562c9ea2e42 (patch) | |
tree | a241f884d68b517706dac392ca861bd1a9c3f282 /intern/cycles/util | |
parent | 72d2d05770a721986986c137a5cbc36cb796062f (diff) |
Cycles: avoid using float3 in kernel constant memory, just so we're sure alignment
is working compatible between cpu and gpu.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_math.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index 7c56f0fbb12..0a1d8ff4555 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -536,6 +536,11 @@ __device_inline float3 float4_to_float3(const float4 a) return make_float3(a.x, a.y, a.z); } +__device_inline float4 float3_to_float4(const float3 a) +{ + return make_float4(a.x, a.y, a.z, 1.0f); +} + #ifndef __KERNEL_GPU__ __device_inline void print_float3(const char *label, const float3& a) |