PDA

View Full Version : PBO 16 Byte alignment?



CaseMillennium
06-29-2010, 07:57 AM
Hi there,

is there a way to force a PBO to allocate on 16 byte alignment? IŽd like to use _mm_store_ps to store the data in it but the alignment of the PBO is random (or 8 byte aligned only), so I need to use the slower _mm_storeu_ps which I would like to avoid.

Any ideas?

mfort
06-29-2010, 09:01 AM
Allocate 16 bytes more and align yourself.
Then use offset parameter in OpenGL API.

Nighthawk
07-07-2010, 08:37 AM
Side note: _mm_stream_ps might be slightly faster than _mm_store_ps. (Avoids cache pollution when writing)