Blender Git Loki

Git Commits -> Revision 02a0f6b

Revision 02a0f6b by Alexander Gavrilov (master)
November 25, 2020, 19:31 (GMT)
Fluid Particles: fix viscoelastic spring threading crash again after D7394.

Since D6133 fluid particle code uses thread local storage to collect
springs created during a time step before adding them to the actual
spring array.

Prior to the switch to TBB there was a single finalize callback which
was called on the main thread, so it could use psys_sph_flush_springs
and insert the new entries into the final buffer. However in D7394 it
was replaced with a reduce callback, which is supposed to be thread
safe and have no side effects. This means that the only thing it can
safely do is copy entries to the other temporary buffer.

In addition, careful checking reveals that the 'classical' solver
doesn't actually add springs, so reduce isn't needed there.

Differential Revision: https://developer.blender.org/D9632

Commit Details:

Full Hash: 02a0f6b04a648b62150a310e67628efc1c0773e8
Parent Commit: 8330e19
Lines Changed: +31, -5

3 Modified Paths:

/source/blender/blenkernel/intern/particle_system.c (+11, -5) (Diff)
/source/blender/blenlib/BLI_buffer.h (+10, -0) (Diff)
/source/blender/blenlib/intern/buffer.c (+10, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021