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>2019-08-12 16:08:07 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-12 16:12:27 +0300
commit922e77036b3b3ea5b3304d1fa2055c526356258c (patch)
treee90556704f51208f9f9f8c058b5df898839173b9 /extern/bullet2
parent3736dabd93418e44f2bf715d91df746525d81948 (diff)
Fix Bullet build error with Clang 8 and Xcode 11
See D5366 and upstream: https://github.com/bulletphysics/bullet3/commit/7f6c479ea6
Diffstat (limited to 'extern/bullet2')
-rw-r--r--extern/bullet2/patches/blender.patch13
-rw-r--r--extern/bullet2/src/LinearMath/btVector3.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/extern/bullet2/patches/blender.patch b/extern/bullet2/patches/blender.patch
index cb3bf2ba38a..b4b24fdc220 100644
--- a/extern/bullet2/patches/blender.patch
+++ b/extern/bullet2/patches/blender.patch
@@ -1,3 +1,16 @@
+diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h
+index 839b19c..3058195 100644
+--- a/extern/bullet2/src/LinearMath/btVector3.h
++++ b/extern/bullet2/src/LinearMath/btVector3.h
+@@ -39,7 +39,7 @@ subject to the following restrictions:
+ #endif
+
+
+-#define BT_SHUFFLE(x,y,z,w) ((w)<<6 | (z)<<4 | (y)<<2 | (x))
++#define BT_SHUFFLE(x,y,z,w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)
+ //#define bt_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) )
+ #define bt_pshufd_ps( _a, _mask ) _mm_shuffle_ps((_a), (_a), (_mask) )
+ #define bt_splat3_ps( _a, _i ) bt_pshufd_ps((_a), BT_SHUFFLE(_i,_i,_i, 3) )
diff --git a/extern/bullet2/src/LinearMath/btScalar.h b/extern/bullet2/src/LinearMath/btScalar.h
--- a/extern/bullet2/src/LinearMath/btScalar.h
+++ b/extern/bullet2/src/LinearMath/btScalar.h
diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h
index 839b19c1449..30581953d2e 100644
--- a/extern/bullet2/src/LinearMath/btVector3.h
+++ b/extern/bullet2/src/LinearMath/btVector3.h
@@ -39,7 +39,7 @@ subject to the following restrictions:
#endif
-#define BT_SHUFFLE(x,y,z,w) ((w)<<6 | (z)<<4 | (y)<<2 | (x))
+#define BT_SHUFFLE(x,y,z,w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)
//#define bt_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) )
#define bt_pshufd_ps( _a, _mask ) _mm_shuffle_ps((_a), (_a), (_mask) )
#define bt_splat3_ps( _a, _i ) bt_pshufd_ps((_a), BT_SHUFFLE(_i,_i,_i, 3) )