favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

thread-safe ConvexDecomposition #501

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have noticed that the convex decomposition code is not properly encapsulated, 
and therefore not thread-safe. Therefore, it wasn't possible to run this part 
of the code in a job-based multi-threaded environment.

Reason for that is the use of some static variables in the code, therefore, 
these variables are used by all the threads running at the same time.

More details here:
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=6477

The submitted patch doesn't add any performance penalty. As the other shape 
types creation are thread safe, I think it would be a good idea to bring this 
change to the main trunk for consistency.

Heavily tested here, and already in production in our products 
(www.imagine3d.fr) !

Original issue reported on code.google.com by easyrid...@gmail.com on 5 Apr 2011 at 7:02

Attachments:

GoogleCodeExporter commented 9 years ago
The patch doesn't apply here, it cannot find the 'Index:' line.

Can you please try again using svn diff?
Thanks,
Erwin

Original comment by erwin.coumans on 5 Apr 2011 at 10:30

GoogleCodeExporter commented 9 years ago
Please have a try with the one below (not sure how I produced the first one !)

Original comment by easyrid...@gmail.com on 6 Apr 2011 at 6:39

Attachments:

GoogleCodeExporter commented 9 years ago
Patch works now, applied in trunk:
http://code.google.com/p/bullet/source/detail?r=2375

Thanks again for sharing those improvements!

Original comment by erwin.coumans on 7 Apr 2011 at 6:29