Cycles: Fix race condition in attributes creation during SVM compilation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -218,6 +218,8 @@ protected:
|
||||
int max_stack_use;
|
||||
uint mix_weight_offset;
|
||||
bool compile_failed;
|
||||
|
||||
thread_spin_lock attribute_lock_;
|
||||
};
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user