fixes to compile/share more code between SPU and PPU
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
template<class T, int size>
|
||||
class DoubleBuffer
|
||||
{
|
||||
#if defined(__CELLOS_LV2__) || defined(USE_LIBSPE2)
|
||||
#if defined(__SPU__) || defined(USE_LIBSPE2)
|
||||
ATTRIBUTE_ALIGNED128( T m_buffer0[size] ) ;
|
||||
ATTRIBUTE_ALIGNED128( T m_buffer1[size] ) ;
|
||||
#else
|
||||
|
||||
@@ -22,7 +22,7 @@ void* cellDmaLargeGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag
|
||||
|
||||
void* cellDmaSmallGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
|
||||
{
|
||||
#if defined (__CELLOS_LV2__) || defined (USE_LIBSPE2)
|
||||
#if defined (__SPU__) || defined (USE_LIBSPE2)
|
||||
mfc_get(ls,ea,size,tag,0,0);
|
||||
return ls;
|
||||
#else
|
||||
@@ -35,7 +35,7 @@ void* cellDmaSmallGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag
|
||||
|
||||
void* cellDmaGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
|
||||
{
|
||||
#if defined (__CELLOS_LV2__) || defined (USE_LIBSPE2)
|
||||
#if defined (__SPU__) || defined (USE_LIBSPE2)
|
||||
cellDmaGet(ls,ea,size,tag,tid,rid);
|
||||
return ls;
|
||||
#else
|
||||
@@ -60,7 +60,7 @@ int stallingUnalignedDmaSmallGet(void *ls, uint64_t ea, uint32_t size)
|
||||
///make sure last 4 bits are the same, for cellDmaSmallGet
|
||||
uint32_t last4BitsOffset = ea & 0x0f;
|
||||
char* tmpTarget = tmpBuffer + last4BitsOffset;
|
||||
#if defined (__CELLOS_LV2__) || defined (USE_LIBSPE2)
|
||||
#if defined (__SPU__) || defined (USE_LIBSPE2)
|
||||
mfc_get(tmpTarget,ea,size,DMA_TAG(1),0,0);
|
||||
#else
|
||||
//copy into final destination
|
||||
@@ -86,7 +86,7 @@ int stallingUnalignedDmaSmallGet(void *ls, uint64_t ea, uint32_t size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined (__CELLOS_LV2__) || defined (USE_LIBSPE2)
|
||||
#if defined (__SPU__) || defined (USE_LIBSPE2)
|
||||
#else
|
||||
|
||||
int cellDmaLargeGet(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "LinearMath/btScalar.h"
|
||||
|
||||
|
||||
#ifdef __CELLOS_LV2__
|
||||
#ifdef __SPU__
|
||||
|
||||
#include <cell/dma.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -13,6 +13,7 @@ subject to the following restrictions:
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
|
||||
#include "SpuCollisionShapes.h"
|
||||
|
||||
btPoint3 localGetSupportingVertexWithoutMargin(int shapeType, void* shape, btVector3& localDir,struct SpuConvexPolyhedronVertexData* convexVertexData)//, int *featureIndex)
|
||||
|
||||
@@ -15,7 +15,6 @@ subject to the following restrictions:
|
||||
|
||||
#include "SpuContactResult.h"
|
||||
|
||||
|
||||
//#define DEBUG_SPU_COLLISION_DETECTION 1
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "SpuCollisionShapes.h" //definition of SpuConvexPolyhedronVertexData
|
||||
|
||||
#ifdef __CELLOS_LV2__
|
||||
#ifdef __SPU__
|
||||
///Software caching from the IBM Cell SDK, it reduces 25% SPU time for our test cases
|
||||
#define USE_SOFTWARE_CACHE 1
|
||||
#endif //__CELLOS_LV2__
|
||||
|
||||
@@ -43,7 +43,7 @@ struct btDispatcherInfo
|
||||
m_useContinuous(false),
|
||||
m_debugDraw(0),
|
||||
m_enableSatConvex(false),
|
||||
m_enableSPU(false),
|
||||
m_enableSPU(true),
|
||||
m_stackAllocator(0)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user