Browse Source

Mark local changes in Bullet source files for NEON support on Android.

Yao Wei Tjong 姚伟忠 10 years ago
parent
commit
e03965fbbf
1 changed files with 6 additions and 2 deletions
  1. 6 2
      Source/ThirdParty/Bullet/src/LinearMath/btVector3.cpp

+ 6 - 2
Source/ThirdParty/Bullet/src/LinearMath/btVector3.cpp

@@ -15,6 +15,8 @@
  This source version has been altered.
  */
 
+ // Modified by Yao Wei Tjong for Urho3D
+
 #if defined (_WIN32) || defined (__i386__)
 #define BT_USE_SSE_IN_API
 #endif
@@ -825,6 +827,7 @@ long _mindot_large( const float *vv, const float *vec, unsigned long count, floa
 #define ARM_NEON_GCC_COMPATIBILITY  1
 #include <arm_neon.h>
 #include <sys/types.h>
+// Urho3D - enable NEON on generic ARM
 #ifdef __APPLE__
 #include <sys/sysctl.h> //for sysctlbyname
 #endif //__APPLE__
@@ -847,6 +850,7 @@ static inline uint32_t btGetCpuCapabilities( void )
 
     if( 0 == testedCapabilities)
     {
+// Urho3D - enable NEON on generic ARM
 #ifdef __APPLE__
         uint32_t hasFeature = 0;
         size_t featureSize = sizeof( hasFeature );
@@ -888,11 +892,11 @@ static long _mindot_large_sel( const float *vv, const float *vec, unsigned long
 }
 
 
-
+// Urho3D - enable NEON on generic ARM
 #if defined __arm__ && __APPLE__
 # define vld1q_f32_aligned_postincrement( _ptr ) ({ float32x4_t _r; asm( "vld1.f32 {%0}, [%1, :128]!\n" : "=w" (_r), "+r" (_ptr) ); /*return*/ _r; })
 #else
-//support 64bit arm
+//support 64bit (and generic) arm
 # define vld1q_f32_aligned_postincrement( _ptr) ({ float32x4_t _r = ((float32x4_t*)(_ptr))[0]; (_ptr) = (const float*) ((const char*)(_ptr) + 16L); /*return*/ _r; })
 #endif