blender/intern
Sergey Sharybin 5c6f6301b0 Image thread safe improvements
This commit makes BKE_image_acquire_ibuf referencing result, which means once
some area requested for image buffer, it'll be guaranteed this buffer wouldn't
be freed by image signal.

To de-reference buffer BKE_image_release_ibuf should now always be used.

To make referencing working correct we can not rely on result of
image_get_ibuf_threadsafe called outside from thread lock. This is so because
we need to guarantee getting image buffer from list of loaded buffers and it's
referencing happens atomic. Without lock here it is possible that between call
of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would
be called. Image signal handling too is blocking now to prevent such a
situation.

Threads are locking by spinlock, which are faster than mutexes. There were some
slowdown reports in the past about render slowdown when using OSX on Xeon CPU.
It shouldn't happen with spin locks, but more tests on different hardware would
be really welcome. So far can not see speed regressions on own computers.

This commit also removes BKE_image_get_ibuf, because it was not so intuitive
when get_ibuf and acquire_ibuf should be used.

Thanks to Ton and Brecht for discussion/review :)
2012-11-15 15:59:58 +00:00
..
audaspace code cleanup: spelling, 2012-11-12 07:33:01 +00:00
bsp style cleanup, also remove redundant call to set_listbasepointers in free_main(). 2012-11-07 01:02:28 +00:00
container code cleanup: unused defines & some formatting. 2012-11-08 06:46:10 +00:00
cycles Image thread safe improvements 2012-11-15 15:59:58 +00:00
dualcon code cleanup: remove redundant casts 2012-10-14 08:49:01 +00:00
elbeem code cleanup: spelling 2012-10-20 20:36:51 +00:00
ffmpeg style cleanup: tabs & whitespace 2012-11-03 15:35:03 +00:00
ghost enable multi-sampling on x11 2012-11-12 10:16:50 +00:00
guardedalloc code cleanup: some warnings and formatting for PyMethodDef's in the BGE. 2012-11-10 05:42:50 +00:00
iksolver style cleanup 2012-09-20 01:32:13 +00:00
itasc add 2 new utility functions to the BGE mesh py api. 2012-11-10 09:45:43 +00:00
locale Fix to allow several include dirs for python under scons build system (needed with new py3.3 debian-like packages). 2012-11-12 18:31:15 +00:00
memutil code cleanup: spelling, 2012-11-12 07:33:01 +00:00
mikktspace code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
moto Cycles: svn merge -r41225:41232 ^/trunk/blender 2011-10-24 22:32:00 +00:00
opencolorio code cleanup: 2012-10-17 04:13:03 +00:00
opennl Fix blender player link error with scons, include opennl for lapacian smooth modifier. 2012-10-24 19:26:00 +00:00
raskter style cleanup 2012-10-27 01:46:47 +00:00
smoke style cleanup and correct own invalid comment. 2012-10-31 11:45:41 +00:00
string use the format attribute in more places, disable X11 options when building with GHOST_SDL 2012-09-16 10:39:19 +00:00
utfconv style cleanup: tabs & whitespace 2012-11-03 15:35:03 +00:00
CMakeLists.txt Replacing gettext i18n backend by boost::locale one. 2012-11-11 16:54:26 +00:00
SConscript Replacing gettext i18n backend by boost::locale one. 2012-11-11 16:54:26 +00:00