PDA

View Full Version : Memory alignment for mappings?



Obli
07-28-2004, 09:57 AM
While I initially asked a thing about buffer swaps (http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=2;t=016836) , I have convinced myself that this is fine.

I have now another little problem.
To minimize the amount of data flying around and make it as fast as possible, I'll probably need to align everything to a 128bit bounduary.

This arises this question to me:
What kind of alignement should I expect from the pointer to a mapped VBO?
More specifically,
Could I simply assume it's aligned?
Which could be written as
Do GPUs have more strict requirements on alignment for VBO addresses in respect to CPUs? What are some actual behaviours? (I remember NV_VAR stated those things but it's a while I don't check it anymore and I would like to have an opinion based on experience).

Thank you.

kehziah
07-28-2004, 11:48 AM
I would say that since the pointer points to a driver-managed lump of memory, it should have the alignment that is best for the implementation. That's the benefit of the VBO architecture (compared to VAR): the driver knows a lot more than you about its requirements for effecient memory management, so it handles it on his own.