64 bits aligned

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

64 bits aligned

Post by evilo »

HI all,

may be it will be a stupid question for you, but on my side I still don't know exactly in which cases buffers need to be 64 bits aligned...

And what are the side effects on non aligned buffers ?

I searched the forum, look at a few sources, and this is not always the case !!

Thank you :)

evilo
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

64 bits is not enough. 128bits ( 16 bytes ) alignment is needed for all dma transfers.
Kung VU
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post by evilo »

Ok,
but without speaking of dma transfert ?

is it needed for buffers declarations ?
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

without dma ( first off, nearly anything you do on this machine is for dma'ing ) you only need to care about alignment for the datawidth you are using, and that is more for performance. so if you are going to read int's float's align to 4 bytes.
Kung VU
Post Reply