Blender Git Commit Log

Git Commits -> Revision 4cf2975

Revision 4cf2975 by Bastien Montagne (compositor-2016)
June 8, 2016, 19:45 (GMT)
Dynapaint: parallelize drip effect.

Was not so far, because this effect is not modifying its 'own' PaintPoint, which means
it's not threadsafe. Since a global lock (mutex or spinlock) would not be much efficient
(we need to lock a given point pretty much all the computaion cycle), and since locking
a same PaintPOint from different threads at the same time is *very* unlikely,
solution here is to use an 'array of locks', one for each PaintPoint (same thing as BLI_bitmap,
using atomic ops to set/clear bits).

Here in own test (complex dynapaint over a huge sphere combining all dynapaint types), it gives
20% speedup of the whole dynapaint simulation!

Note: maybe we'd want to move that kind of bitlock into BLI lib some day - not totally sure how,
so let's keep it local for now...

Commit Details:

Full Hash: 4cf29754dfe2c4f9bb47db9b7caed10dd30f12f6
Parent Commit: 093bfb9
Committed By: Jeroen Bakker
Lines Changed: +128, -66

1 Modified Path:

/source/blender/blenkernel/intern/dynamicpaint.c (+128, -66) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021