enable SIMD for Apple OSX Intel

compile fixes for _btGpu_computeGridSize undefined in libBulletMultiThreaded
http://code.google.com/p/bullet/issues/detail?id=246
This commit is contained in:
erwin.coumans 2009-07-16 06:23:04 +00:00
parent 40c73f327c
commit 82828745ea
9 changed files with 42 additions and 10 deletions

View File

@ -19,6 +19,7 @@ subject to the following restrictions:
#include "BulletMultiThreaded/btGpuUtilsSharedCode.h"
#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h"
#include "btGpuDemoPairCache.h"

View File

@ -13,9 +13,6 @@ subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution.
*/
#include "BulletMultiThreaded/btGpuDefines.h"
#include "BulletMultiThreaded/btGpuUtilsSharedDefs.h"
#include "BulletMultiThreaded/btGpuUtilsSharedCode.h"
#include "BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h"
#include "BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h"

View File

@ -16,7 +16,7 @@ ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL }
)
LINK_LIBRARIES(
OpenGLSupport BulletDynamics BulletCollision LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
OpenGLSupport BulletMultiThreaded BulletDynamics BulletCollision LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
ADD_EXECUTABLE(AppGpu3dDemo

View File

@ -60,6 +60,10 @@
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE

View File

@ -57,7 +57,7 @@ subject to the following restrictions:
// Specific methods implementation
//SSE gives errors on a MSVC 7.1
#ifdef BT_USE_SSE
#if defined (BT_USE_SSE) && defined (WIN32)
#define DBVT_SELECT_IMPL DBVT_IMPL_SSE
#define DBVT_MERGE_IMPL DBVT_IMPL_SSE
#define DBVT_INT0_IMPL DBVT_IMPL_SSE

View File

@ -13,6 +13,11 @@ subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution.
*/
///The 3 following lines include the CPU implementation of the kernels, keep them in this order.
#include "BulletMultiThreaded/btGpuDefines.h"
#include "BulletMultiThreaded/btGpuUtilsSharedDefs.h"
#include "BulletMultiThreaded/btGpuUtilsSharedCode.h"
#include "LinearMath/btAlignedAllocator.h"

View File

@ -102,13 +102,13 @@ void btSoftRigidDynamicsWorld::solveSoftBodiesConstraints()
}
}
void btSoftRigidDynamicsWorld::addSoftBody(btSoftBody* body)
void btSoftRigidDynamicsWorld::addSoftBody(btSoftBody* body,short int collisionFilterGroup,short int collisionFilterMask)
{
m_softBodies.push_back(body);
btCollisionWorld::addCollisionObject(body,
btBroadphaseProxy::DefaultFilter,
btBroadphaseProxy::AllFilter);
collisionFilterGroup,
collisionFilterMask);
}

View File

@ -50,7 +50,7 @@ public:
virtual void debugDrawWorld();
void addSoftBody(btSoftBody* body);
void addSoftBody(btSoftBody* body,short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter,short int collisionFilterMask=btBroadphaseProxy::AllFilter);
void removeSoftBody(btSoftBody* body);

View File

@ -128,6 +128,31 @@ inline int btGetVersion()
#else
//non-windows systems
#if (defined (__APPLE__) && defined (__i386__))
#define BT_USE_SSE
#include <emmintrin.h>
#define SIMD_FORCE_INLINE inline
///@todo: check out alignment methods for other platforms/compilers
#define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
#define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
#ifndef assert
#include <assert.h>
#endif
#if defined(DEBUG) || defined (_DEBUG)
#define btAssert assert
#else
#define btAssert(x)
#endif
//btFullAssert is optional, slows down a lot
#define btFullAssert(x)
#define btLikely(_c) _c
#define btUnlikely(_c) _c
#else
#define SIMD_FORCE_INLINE inline
///@todo: check out alignment methods for other platforms/compilers
///#define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
@ -148,7 +173,7 @@ inline int btGetVersion()
#define btFullAssert(x)
#define btLikely(_c) _c
#define btUnlikely(_c) _c
#endif //__APPLE__
#endif // LIBSPE2