Blender Git Commit Log
Git Commits -> Revision 0844451
Revision 0844451 by Lukas Toenne (master) March 7, 2014, 10:20 (GMT) |
Removing ParticleSystem->frand arrays to avoid memory corruption issues in threaded depgraph updates and effector list construction. Gathering effectors during depgraph updates will call the psys_check_enabled function. This in turn contained a DNA alloc call for the psys->frand RNG arrays, which is really bad because data must be immutable during these effector constructions. To avoid such allocs the frand array is now global for all particle systems. To avoid correlation of pseudo-random numbers the psys->seed value is complemented with random offset and multiplier for the actual float array. This is not ideal, but work sufficiently well (given that random numbers were already really limited and show repetition quite easily for particle counts > PSYS_FRAND_COUNT). |
Commit Details:
Full Hash: 08444518e62b4c7154c1428c33adab842774aa30
Parent Commit: 98abc80
Lines Changed: +99, -78
10 Modified Paths:
/source/blender/blenkernel/BKE_particle.h (+30, -3) (Diff)
/source/blender/blenkernel/intern/boids.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/object.c (+0, -1) (Diff)
/source/blender/blenkernel/intern/particle.c (+31, -35) (Diff)
/source/blender/blenkernel/intern/particle_system.c (+26, -26) (Diff)
/source/blender/blenloader/intern/readfile.c (+0, -1) (Diff)
/source/blender/editors/space_view3d/drawobject.c (+4, -4) (Diff)
/source/blender/makesdna/DNA_particle_types.h (+0, -2) (Diff)
/source/blender/render/intern/source/convertblender.c (+4, -4) (Diff)
/source/creator/creator.c (+2, -0) (Diff)
/source/blender/blenkernel/intern/boids.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/object.c (+0, -1) (Diff)
/source/blender/blenkernel/intern/particle.c (+31, -35) (Diff)
/source/blender/blenkernel/intern/particle_system.c (+26, -26) (Diff)
/source/blender/blenloader/intern/readfile.c (+0, -1) (Diff)
/source/blender/editors/space_view3d/drawobject.c (+4, -4) (Diff)
/source/blender/makesdna/DNA_particle_types.h (+0, -2) (Diff)
/source/blender/render/intern/source/convertblender.c (+4, -4) (Diff)
/source/creator/creator.c (+2, -0) (Diff)