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@gmail.com>2013-11-23 08:24:26 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-23 08:47:57 +0400
commit58ec292fd82a168ac4901163c525325b6e28ae70 (patch)
tree7041a8103e4507befcdd33347d6a4624d9559ff1
parent5a4f7f46a569f7251b51a8b2199603af75782c83 (diff)
Fix cycles build error with visual studio, apparently the windows ABI does not
like 16 bit alignment on 32 bit.
-rw-r--r--intern/cycles/util/util_types.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h
index fe743221f32..3fa1df6ab44 100644
--- a/intern/cycles/util/util_types.h
+++ b/intern/cycles/util/util_types.h
@@ -23,6 +23,12 @@
#endif
+/* Bitness */
+
+#if defined(__ppc64__) || defined(__PPC64__) || defined(__x86_64__) || defined(__ia64__) || defined(_M_X64)
+#define __KERNEL_64_BIT__
+#endif
+
/* Qualifiers for kernel code shared by CPU and GPU */
#ifndef __KERNEL_GPU__
@@ -34,7 +40,11 @@
#if defined(_WIN32) && !defined(FREE_WINDOWS)
#define ccl_device_inline static __forceinline
+#ifdef __KERNEL_64_BIT__
#define ccl_align(...) __declspec(align(__VA_ARGS__))
+#else
+#define ccl_align(...) /* not support for function arguments (error C2719) */
+#endif
#define ccl_may_alias
#else
#define ccl_device_inline static inline __attribute__((always_inline))
@@ -47,12 +57,6 @@
#endif
-/* Bitness */
-
-#if defined(__ppc64__) || defined(__PPC64__) || defined(__x86_64__) || defined(__ia64__) || defined(_M_X64)
-#define __KERNEL_64_BIT__
-#endif
-
/* SIMD Types */
#ifndef __KERNEL_GPU__