Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-09-09 13:27:51 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-09-13 14:46:49 +0300
commit0de69e56b43f194d3d79ad28c3cd6e49e88aa8d2 (patch)
tree9841a5136a8fceed9c971a1c5db3c3f5529659e0 /intern/cycles/render/image.cpp
parentf38f7874488de876410e1bb4acf67a4629ba2b82 (diff)
Cycles: Implement threaded SVM nodes compilation
The title says it all actually. From tests with barber shop scene here gives 2-3x speedup for shader compilation on my oldie i7 machine. The gain is mainly due to textures metadata query from jpeg files (which seems to requite de-compression before metadata can be read). But in theory could give nice improvements for scenes with huge node trees as well (i'm talking about node trees of complexity of fractal which we had reports about in the past). Reviewers: juicyfruit, dingto, lukasstockner97, brecht Reviewed By: brecht Subscribers: monio, Blendify Differential Revision: https://developer.blender.org/D2215
Diffstat (limited to 'intern/cycles/render/image.cpp')
-rw-r--r--intern/cycles/render/image.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index 24543601ef9..b387c2c2f98 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -280,6 +280,8 @@ int ImageManager::add_image(const string& filename,
ImageDataType type = get_image_metadata(filename, builtin_data, is_linear);
+ thread_scoped_lock device_lock(device_mutex);
+
/* Do we have a float? */
if(type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4)
is_float = true;