blender/intern/cycles/kernel
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
..
closure Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like 2012-11-06 19:59:07 +00:00
osl OSL Scons rules 2012-11-15 13:11:12 +00:00
shaders Fix #33183: cycles bump mapping was not executed with only an AO node in a material. 2012-11-15 14:08:46 +00:00
svm Cycles: add strength input for normal map node. 2012-11-08 16:35:20 +00:00
CMakeLists.txt Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like 2012-11-06 19:59:07 +00:00
kernel_accumulate.h Cycles OSL: windows build fixes. 2012-11-14 17:18:47 +00:00
kernel_attribute.h Cycles: add Tangent input for Anisotropic BSDF. 2012-10-17 12:17:17 +00:00
kernel_bvh.h Cycles: disable motion blur for CUDA entirely now, also goes wrong on other 2012-10-20 15:09:27 +00:00
kernel_camera.h Attempts to fix CUDA issues on sm 2.0 cards, still no luck getting motion blur 2012-10-17 22:48:29 +00:00
kernel_compat_cpu.h Cycles: merge of changes from tomato branch. 2012-09-04 13:29:07 +00:00
kernel_compat_cuda.h Cycles / CUDA: 2012-05-28 23:51:06 +00:00
kernel_compat_opencl.h Cycles: remove a few usages of double, to fix opencl warnings. 2012-04-30 10:03:13 +00:00
kernel_differential.h code cleanup: spelling 2012-07-16 23:23:33 +00:00
kernel_displace.h Attempts to fix CUDA issues on sm 2.0 cards, still no luck getting motion blur 2012-10-17 22:48:29 +00:00
kernel_emission.h More fixes related to #32900, motion blur with cuda sm 2.0 still disabled. 2012-10-18 12:45:27 +00:00
kernel_film.h Cycles: fixes for OpenCL build after pass changes, patch by Daniel Genrich. 2012-01-26 15:37:33 +00:00
kernel_globals.h Cycles: merge of changes from tomato branch. 2012-09-04 13:29:07 +00:00
kernel_light.h Attempts to fix CUDA issues on sm 2.0 cards, still no luck getting motion blur 2012-10-17 22:48:29 +00:00
kernel_math.h Cycles render engine, initial commit. This is the engine itself, blender modifications and build instructions will follow later. 2011-04-27 11:58:34 +00:00
kernel_montecarlo.h Cycles: Anisotropic BSDF enabled, with tangents now computed from the active UV map. 2012-10-10 13:02:20 +00:00
kernel_object.h Cycles: improve Anisotropic BSDF node, changing the Roughness U/V inputs to 2012-11-04 22:31:32 +00:00
kernel_optimized.cpp style cleanup: block comments 2012-06-09 17:22:52 +00:00
kernel_passes.h Fix #32072: cycles shadow pass gave different results with/without emitting 2012-09-28 13:41:34 +00:00
kernel_path.h Cycles: ambient occlusion now takes per-BSDF normals into account. 2012-11-15 15:37:58 +00:00
kernel_projection.h Fisheye Equidistant Lens algorith bugfix 2012-11-09 09:11:24 +00:00
kernel_random.h code cleanup: quiet all warnings about double promotion (either by changing the type or explicitly casting). 2012-06-09 17:45:22 +00:00
kernel_shader.h Image thread safe improvements 2012-11-15 15:59:58 +00:00
kernel_textures.h Cycles: merge of changes from tomato branch. 2012-09-04 13:29:07 +00:00
kernel_triangle.h Cycles OSL: refactoring and fixes 2012-11-03 14:32:13 +00:00
kernel_types.h Cycles: 4 new nodes. 2012-11-06 19:59:02 +00:00
kernel.cl Cycles: Render Passes 2012-01-25 17:23:52 +00:00
kernel.cpp Cycles: merge of changes from tomato branch. 2012-09-04 13:29:07 +00:00
kernel.cu Cycles: Render Passes 2012-01-25 17:23:52 +00:00
kernel.h Cycles: Render Passes 2012-01-25 17:23:52 +00:00
SConscript Cycles / CUDA: 2012-05-28 19:49:26 +00:00