diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-21 14:26:48 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-21 14:26:48 +0400 |
commit | 12117a81878d2e6909b3f9e13eccdd31cedf8be9 (patch) | |
tree | 3af946c2c11358b95e51340fa8a77f4d6809f29a /intern/cycles | |
parent | eb219852a839f23bfeb9dd5c24bb4bb90ef0c367 (diff) |
Fix cycles aliasing warnings caused by motion blur transforms.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/kernel_compat_cuda.h | 1 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_compat_opencl.h | 1 | ||||
-rw-r--r-- | intern/cycles/util/util_transform.h | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_types.h | 2 |
4 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_compat_cuda.h b/intern/cycles/kernel/kernel_compat_cuda.h index 40bae069dea..9fd065c3cda 100644 --- a/intern/cycles/kernel/kernel_compat_cuda.h +++ b/intern/cycles/kernel/kernel_compat_cuda.h @@ -37,6 +37,7 @@ #define __global #define __shared __shared__ #define __constant +#define __may_alias /* No assert supported for CUDA */ diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h index a9d18588cc8..abb2f094f5c 100644 --- a/intern/cycles/kernel/kernel_compat_opencl.h +++ b/intern/cycles/kernel/kernel_compat_opencl.h @@ -40,6 +40,7 @@ #define __device #define __device_inline __device #define __device_noinline __device __noinline +#define __may_alias /* no assert in opencl */ #define kernel_assert(cond) diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h index a1c12ddf0e1..1f19f85f894 100644 --- a/intern/cycles/util/util_transform.h +++ b/intern/cycles/util/util_transform.h @@ -45,7 +45,7 @@ typedef struct Transform { * * For the DecompMotionTransform we drop scale from pre/post. */ -typedef struct MotionTransform { +typedef struct __may_alias MotionTransform { Transform pre; Transform mid; Transform post; diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h index 3d246104ddc..00b6cf5c56e 100644 --- a/intern/cycles/util/util_types.h +++ b/intern/cycles/util/util_types.h @@ -39,12 +39,14 @@ #if defined(_WIN32) && !defined(FREE_WINDOWS) #define __device_inline static __forceinline #define __align(...) __declspec(align(__VA_ARGS__)) +#define __may_alias #else #define __device_inline static inline __attribute__((always_inline)) #ifndef FREE_WINDOWS64 #define __forceinline inline __attribute__((always_inline)) #endif #define __align(...) __attribute__((aligned(__VA_ARGS__))) +#define __may_alias __attribute__((__may_alias__)) #endif #endif |