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>2017-04-05 15:57:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-05 15:57:54 +0300
commit52029e689ceb9fec0a873d6ed3d0c036d58be8cd (patch)
treed22cdc69d4226e0a3e19440d9e001a4a7c38c249 /intern/cycles/render/svm.cpp
parent3ce30823ffadcf208ecd353a8541f7f86d85d91e (diff)
Cycles: Fix race condition in attributes creation during SVM compilation
Diffstat (limited to 'intern/cycles/render/svm.cpp')
-rw-r--r--intern/cycles/render/svm.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp
index 48287d872d4..9cf3f4cb0b2 100644
--- a/intern/cycles/render/svm.cpp
+++ b/intern/cycles/render/svm.cpp
@@ -393,11 +393,13 @@ void SVMCompiler::add_node(const float4& f)
uint SVMCompiler::attribute(ustring name)
{
+ thread_scoped_spin_lock lock(attribute_lock_);
return shader_manager->get_attribute_id(name);
}
uint SVMCompiler::attribute(AttributeStandard std)
{
+ thread_scoped_spin_lock lock(attribute_lock_);
return shader_manager->get_attribute_id(std);
}