added a cellDmaLargeGetReadOnly/cellDmaGetReadOnly, which avoid memcpy on non-SPU platforms.

enabled it for triangle mesh aabb DMA transfers. Todo: check if it is worth also modifying other parts of the code to avoid the memcpy into the 256kb Task memory.
This commit is contained in:
ejcoumans
2007-10-16 23:58:26 +00:00
parent 239d88985f
commit 830c096e10
3 changed files with 32 additions and 5 deletions

View File

@@ -5,6 +5,27 @@
#define USE_MEMCPY 1
void* cellDmaLargeGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
{
#if defined (WIN32) || defined (__PPU__)
return (void*)(uint32_t)ea;
#else
cellDmaLargeGet(ls,ea,size,tag,tid,rid);
return ls;
#endif //WIN32
}
void* cellDmaGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
{
#if defined (WIN32) || defined (__PPU__)
return (void*)(uint32_t)ea;
#else
cellDmaGet(ls,ea,size,tag,tid,rid);
return ls;
#endif //WIN32
}
///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)