yoshinoToylogic / bulletsharp

Automatically exported from code.google.com/p/bulletsharp
MIT License
0 stars 0 forks source link

Align vectors to 16 bytes for SSE #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Bullet rev. 2625 enabled SSE. All btTransform and btVector3 allocations in 
BulletSharp therefore need to be aligned to 16-byte boundaries. Otherwise, 
AccessViolationExceptions will occur.

Original issue reported on code.google.com by andres.traks on 20 Dec 2012 at 1:25

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r446.

Original comment by andres.traks on 20 Dec 2012 at 9:55

GoogleCodeExporter commented 8 years ago
This is still sketchy. BT_USE_SSE_IN_API is not explicitly defined in 
btScalar.h, but some Bullet source files (e.g. btConvexHullShape.cpp, 
btMultiSphereShape.cpp etc.) still override this and define BT_USE_SSE_IN_API 
at the top.

All managed->unmanaged conversions of vectors/matrices are currently set to use 
btAlignedAlloc, which hurts performance a bit.

Need to figure out which conversions need the alignment fix.

Original comment by andres.traks on 28 Nov 2013 at 10:00