blender/source/gameengine
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
..
BlenderRoutines Compile fixes for recent boost changes 2012-11-05 15:23:09 +00:00
Converter buildsystem cleanup: remove duplicate source & includes for scons, 2012-11-14 01:41:24 +00:00
Expressions - property sensor was converting floating point values to text then back to float - for floating point properties. 2012-11-10 22:32:15 +00:00
GameLogic BGE: fix for 2 uses of uninitialized memory - property-sensor and object-color for materials. 2012-11-11 10:03:25 +00:00
GamePlayer Image thread safe improvements 2012-11-15 15:59:58 +00:00
Ketsji Image thread safe improvements 2012-11-15 15:59:58 +00:00
Network code cleanup: unused defines & some formatting. 2012-11-08 06:46:10 +00:00
Physics BGE: Committing patch [#32697] "New BGE gravity API" by HG1. 2012-11-10 03:11:18 +00:00
Rasterizer buildsystem cleanup: remove duplicate source & includes for scons, 2012-11-14 01:41:24 +00:00
SceneGraph code cleanup: unused defines & some formatting. 2012-11-08 06:46:10 +00:00
VideoTexture code cleanup: some warnings and formatting for PyMethodDef's in the BGE. 2012-11-10 05:42:50 +00:00
CMakeLists.txt code cleanup: use system includes for cmake, otherwise warnings get printed in headers. 2012-09-18 04:40:20 +00:00
SConscript enable building the game engine without bullet for scons & cmake 2010-10-10 07:01:56 +00:00