Fix threading issues of viewport rendering when using movies/generated images
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 24 Jan 2013 08:14:20 +0000 (08:14 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 24 Jan 2013 08:14:20 +0000 (08:14 +0000)
commit59a187b33876ad274cfd5cfcf13a3d25dbfe1b0a
tree64b4e2d36dda1c5a063db814c5dd5ff720c830c3
parent5e739ddae2cc5fdb30e62544bfdd5b55284962a5
Fix threading issues of viewport rendering when using movies/generated images

Issue was caused by the fact that guarded allocator is not thread-safe and
generated images/movies could allocate memory when loading pixels to Cycles.

Currently solved by switching memory allocator to using mutex lock (the same
as sued for jobs) when viewport rendering is used.

Nicer solution would be to make guarded allocator thread-safe by using atomic
operations and lock-free lists, but that's more serious change.
source/blender/editors/space_view3d/view3d_draw.c
source/blender/render/extern/include/RE_engine.h
source/blender/render/intern/source/external_engine.c