- use mfc directly, instead of cellDmaSmallGet (allow sizes under 32 bytes, instead of 16)
- align btBroadphaseProxy to 16 bytes
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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])
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user