From e279aed08fab5ed562e4c966c8bc0d78bd8e906d Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Sat, 3 May 2014 10:11:49 -0700 Subject: [PATCH] re-enable the fix for broken friction in Clang (got accidently undone in a recent commit) fix OSX build --- .../btSequentialImpulseConstraintSolver.cpp | 4 ++-- src/LinearMath/btCpuFeatureUtility.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp b/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp index ee5000e22..8385639a1 100644 --- a/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp +++ b/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp @@ -606,8 +606,8 @@ void btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstr // btScalar positionalError = 0.f; - btSimdScalar velocityError = desiredVelocity - rel_vel; - btSimdScalar velocityImpulse = velocityError * btSimdScalar(solverConstraint.m_jacDiagABInv); + btScalar velocityError = desiredVelocity - rel_vel; + btScalar velocityImpulse = velocityError * solverConstraint.m_jacDiagABInv; solverConstraint.m_rhs = velocityImpulse; solverConstraint.m_rhsPenetration = 0.f; solverConstraint.m_cfm = cfmSlip; diff --git a/src/LinearMath/btCpuFeatureUtility.h b/src/LinearMath/btCpuFeatureUtility.h index b3ed59eab..47e5a4178 100644 --- a/src/LinearMath/btCpuFeatureUtility.h +++ b/src/LinearMath/btCpuFeatureUtility.h @@ -5,9 +5,12 @@ #include "LinearMath/btScalar.h" #include //memset -#ifdef BT_USE_SSE +#ifdef USE_SIMD +#include +#ifdef BT_ALLOW_SSE4 #include -#endif +#endif //BT_ALLOW_SSE4 +#endif //USE_SIMD #if defined BT_USE_NEON #define ARM_NEON_GCC_COMPATIBILITY 1