Go to file
Sergey Sharybin 86991fbcb0 Fixed render time regression in Blender Internal
It was caused by image threading safe commit and it was noticeable
only on really multi-core CPU (like dual-socket Xeon stations), was
not visible on core i7 machine.

The reason of slowdown was spinlock around image buffer referencing,
which lead to lots of cores waiting for single core and using image
buffer after it was referenced was not so much longer than doing
reference itself.

The most clear solution here seemed to be introducing Image Pool
which will contain list of loaded and referenced image buffers, so
all threads could skip lock if the pool is used for reading only.
Lock only needed in cases when buffer for requested image user is
missing in the pool. This lock will happen only once per image so
overall amount of locks is much less that it was before.

To operate with pool:
- BKE_image_pool_new() creates new pool
- BKE_image_pool_free() destroys pool and dereferences all image
  buffers which were loaded to it
- BKE_image_pool_acquire_ibuf() returns image buffer for given
  image and user. Pool could be NULL and in this case fallback to
  BKE_image_acquire_ibuf will happen.

  This helps to avoid lots to if(poll) checks in image sampling
  code.

- BKE_image_pool_release_ibuf releases image buffer. In fact, it
  will only do something if pool is NULL, in all other case it'll
  equal to DoNothing operation.
2013-01-21 08:49:42 +00:00
build_files code cleanup: 2013-01-15 23:17:45 +00:00
doc code cleanup: 2013-01-15 23:17:45 +00:00
extern add option WITH_SYSTEM_BULLET to link against the bullet installation found on the system. 2013-01-03 00:23:52 +00:00
intern Cycles Hair: Fix of cardinal curve intersection routine 2013-01-21 00:58:14 +00:00
release Bugfix [#33946] Bake Action fails in SVN for Objects 2013-01-21 02:40:51 +00:00
source Fixed render time regression in Blender Internal 2013-01-21 08:49:42 +00:00
CMakeLists.txt Dosvidanya, old compositor! 2013-01-14 15:53:17 +00:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile code cleanup: comment unused members of bmesh operator slots and some osl style edits. 2012-11-20 14:31:58 +00:00
SConstruct Further tweaks to buildbot 2013-01-10 08:55:44 +00:00