fix error in Visual Studio 2005 build, due to unsupported SSE intrinsics

This commit is contained in:
erwin.coumans
2013-10-16 21:25:52 +00:00
parent d4640227ce
commit d998680a68
2 changed files with 10 additions and 10 deletions

View File

@@ -212,7 +212,7 @@ public:
btFullAssert(d != btScalar(0.0)); btFullAssert(d != btScalar(0.0));
btScalar s = btScalar(2.0) / d; btScalar s = btScalar(2.0) / d;
#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE) #if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
__m128 vs, Q = q.get128(); __m128 vs, Q = q.get128();
__m128i Qi = btCastfTo128i(Q); __m128i Qi = btCastfTo128i(Q);
__m128 Y, Z; __m128 Y, Z;
@@ -346,7 +346,7 @@ public:
* @param m The array to be filled */ * @param m The array to be filled */
void getOpenGLSubMatrix(btScalar *m) const void getOpenGLSubMatrix(btScalar *m) const
{ {
#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE) #if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
__m128 v0 = m_el[0].mVec128; __m128 v0 = m_el[0].mVec128;
__m128 v1 = m_el[1].mVec128; __m128 v1 = m_el[1].mVec128;
__m128 v2 = m_el[2].mVec128; // x2 y2 z2 w2 __m128 v2 = m_el[2].mVec128; // x2 y2 z2 w2
@@ -745,7 +745,7 @@ public:
SIMD_FORCE_INLINE btMatrix3x3& SIMD_FORCE_INLINE btMatrix3x3&
btMatrix3x3::operator*=(const btMatrix3x3& m) btMatrix3x3::operator*=(const btMatrix3x3& m)
{ {
#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE) #if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
__m128 rv00, rv01, rv02; __m128 rv00, rv01, rv02;
__m128 rv10, rv11, rv12; __m128 rv10, rv11, rv12;
__m128 rv20, rv21, rv22; __m128 rv20, rv21, rv22;
@@ -958,7 +958,7 @@ btMatrix3x3::determinant() const
SIMD_FORCE_INLINE btMatrix3x3 SIMD_FORCE_INLINE btMatrix3x3
btMatrix3x3::absolute() const btMatrix3x3::absolute() const
{ {
#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)) #if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
return btMatrix3x3( return btMatrix3x3(
_mm_and_ps(m_el[0].mVec128, btvAbsfMask), _mm_and_ps(m_el[0].mVec128, btvAbsfMask),
_mm_and_ps(m_el[1].mVec128, btvAbsfMask), _mm_and_ps(m_el[1].mVec128, btvAbsfMask),
@@ -979,7 +979,7 @@ btMatrix3x3::absolute() const
SIMD_FORCE_INLINE btMatrix3x3 SIMD_FORCE_INLINE btMatrix3x3
btMatrix3x3::transpose() const btMatrix3x3::transpose() const
{ {
#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)) #if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
__m128 v0 = m_el[0].mVec128; __m128 v0 = m_el[0].mVec128;
__m128 v1 = m_el[1].mVec128; __m128 v1 = m_el[1].mVec128;
__m128 v2 = m_el[2].mVec128; // x2 y2 z2 w2 __m128 v2 = m_el[2].mVec128; // x2 y2 z2 w2
@@ -1036,7 +1036,7 @@ btMatrix3x3::inverse() const
SIMD_FORCE_INLINE btMatrix3x3 SIMD_FORCE_INLINE btMatrix3x3
btMatrix3x3::transposeTimes(const btMatrix3x3& m) const btMatrix3x3::transposeTimes(const btMatrix3x3& m) const
{ {
#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)) #if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
// zeros w // zeros w
// static const __m128i xyzMask = (const __m128i){ -1ULL, 0xffffffffULL }; // static const __m128i xyzMask = (const __m128i){ -1ULL, 0xffffffffULL };
__m128 row = m_el[0].mVec128; __m128 row = m_el[0].mVec128;
@@ -1156,7 +1156,7 @@ operator*(const btMatrix3x3& m, const btVector3& v)
SIMD_FORCE_INLINE btVector3 SIMD_FORCE_INLINE btVector3
operator*(const btVector3& v, const btMatrix3x3& m) operator*(const btVector3& v, const btMatrix3x3& m)
{ {
#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)) #if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
const __m128 vv = v.mVec128; const __m128 vv = v.mVec128;
@@ -1196,7 +1196,7 @@ operator*(const btVector3& v, const btMatrix3x3& m)
SIMD_FORCE_INLINE btMatrix3x3 SIMD_FORCE_INLINE btMatrix3x3
operator*(const btMatrix3x3& m1, const btMatrix3x3& m2) operator*(const btMatrix3x3& m1, const btMatrix3x3& m2)
{ {
#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)) #if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
__m128 m10 = m1[0].mVec128; __m128 m10 = m1[0].mVec128;
__m128 m11 = m1[1].mVec128; __m128 m11 = m1[1].mVec128;

View File

@@ -291,7 +291,7 @@ public:
* @param q The other quaternion */ * @param q The other quaternion */
btScalar dot(const btQuaternion& q) const btScalar dot(const btQuaternion& q) const
{ {
#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE) #if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
__m128 vd; __m128 vd;
vd = _mm_mul_ps(mVec128, q.mVec128); vd = _mm_mul_ps(mVec128, q.mVec128);
@@ -867,7 +867,7 @@ quatRotate(const btQuaternion& rotation, const btVector3& v)
{ {
btQuaternion q = rotation * v; btQuaternion q = rotation * v;
q *= rotation.inverse(); q *= rotation.inverse();
#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE) #if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
return btVector3(_mm_and_ps(q.get128(), btvFFF0fMask)); return btVector3(_mm_and_ps(q.get128(), btvFFF0fMask));
#elif defined(BT_USE_NEON) #elif defined(BT_USE_NEON)
return btVector3((float32x4_t)vandq_s32((int32x4_t)q.get128(), btvFFF0Mask)); return btVector3((float32x4_t)vandq_s32((int32x4_t)q.get128(), btvFFF0Mask));