- use mfc directly, instead of cellDmaSmallGet (allow sizes under 32 bytes, instead of 16)

- align btBroadphaseProxy to 16 bytes
This commit is contained in:
ejcoumans
2007-10-16 00:52:23 +00:00
parent 1d8a2539dc
commit 6303d98844
3 changed files with 1621 additions and 1619 deletions

View File

@@ -9,7 +9,9 @@
///this unalignedDma should not be frequently used, only for small data. It handles alignment and performs check on size (<16 bytes) ///this unalignedDma should not be frequently used, only for small data. It handles alignment and performs check on size (<16 bytes)
int stallingUnalignedDmaSmallGet(void *ls, uint64_t ea, uint32_t size) int stallingUnalignedDmaSmallGet(void *ls, uint64_t ea, uint32_t size)
{ {
btAssert(size<16);
btAssert(size<32);
ATTRIBUTE_ALIGNED16(char tmpBuffer[32]); ATTRIBUTE_ALIGNED16(char tmpBuffer[32]);
char* mainMem = (char*)ea; char* mainMem = (char*)ea;
@@ -31,7 +33,7 @@ int stallingUnalignedDmaSmallGet(void *ls, uint64_t ea, uint32_t size)
} }
#endif //USE_MEMCPY #endif //USE_MEMCPY
#else #else
cellDmaSmallGet(tmpTarget,ea,size,DMA_TAG(1),0,0); mfc_get(tmpTarget,ea,size,DMA_TAG(1),0,0);
//copy into final destination //copy into final destination
#endif //WIN32 #endif //WIN32

View File

@@ -1,6 +1,7 @@
#include "SpuGatheringCollisionTask.h" #include "SpuGatheringCollisionTask.h"
//#define DEBUG_SPU_COLLISION_DETECTION 1
#include "../SpuDoubleBuffer.h" #include "../SpuDoubleBuffer.h"
#include "../SpuCollisionTaskProcess.h" #include "../SpuCollisionTaskProcess.h"
@@ -190,7 +191,7 @@ void ProcessSpuConvexConvexCollision(SpuCollisionPairInput* wuInput, CollisionTa
#define USE_BRANCHFREE_TEST 1 #define USE_BRANCHFREE_TEST 1
#ifdef USE_BRANCHFREE_TEST #ifdef USE_BRANCHFREE_TEST
unsigned int spuTestQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) SIMD_FORCE_INLINE unsigned int spuTestQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2)
{ {
return btSelect((unsigned)((aabbMin1[0] <= aabbMax2[0]) & (aabbMax1[0] >= aabbMin2[0]) return btSelect((unsigned)((aabbMin1[0] <= aabbMax2[0]) & (aabbMax1[0] >= aabbMin2[0])
& (aabbMin1[2] <= aabbMax2[2]) & (aabbMax1[2] >= aabbMin2[2]) & (aabbMin1[2] <= aabbMax2[2]) & (aabbMax1[2] >= aabbMin2[2])

View File

@@ -64,8 +64,7 @@ CONCAVE_SHAPES_END_HERE,
///btBroadphaseProxy ///btBroadphaseProxy
//ATTRIBUTE_ALIGNED16(struct) btBroadphaseProxy ATTRIBUTE_ALIGNED16(struct) btBroadphaseProxy
struct btBroadphaseProxy
{ {
BT_DECLARE_ALIGNED_ALLOCATOR(); BT_DECLARE_ALIGNED_ALLOCATOR();