Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-21 14:26:48 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-21 14:26:48 +0400
commit12117a81878d2e6909b3f9e13eccdd31cedf8be9 (patch)
tree3af946c2c11358b95e51340fa8a77f4d6809f29a /intern/cycles
parenteb219852a839f23bfeb9dd5c24bb4bb90ef0c367 (diff)
Fix cycles aliasing warnings caused by motion blur transforms.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/kernel/kernel_compat_cuda.h1
-rw-r--r--intern/cycles/kernel/kernel_compat_opencl.h1
-rw-r--r--intern/cycles/util/util_transform.h2
-rw-r--r--intern/cycles/util/util_types.h2
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