Blender Git Loki
Git Commits -> Revision dd6c918
Revision dd6c918 by Bastien Montagne (master) November 25, 2017, 19:28 (GMT) |
Fix broken atomic_cas lock in own recent commit in bmesh. Using atomic cas correctly is really hairy... ;) In this case, the returned value from cas needs to validate *two* conditions, it must not be FLT_MAX (which is our 'locked' value and would mean another thread has already locked it), but it also must be equal to previously stored value... This means we need two steps per loop here, hence using a 'for' loop instead of a 'while' one now. Note that collisions are (as expected) very rare, less than 1 for 10k typically, so did not catch the issue initially (also because I was mostly working with release build to check on performances...). |
Commit Details:
Full Hash: dd6c918b2ccc6ca546e9a8c5cb5ac169a59e8316
Parent Commit: 1caa267
Lines Changed: +7, -1
1 Modified Path:
/source/blender/bmesh/intern/bmesh_mesh.c (+7, -1) (Diff)