mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Cycles: Fix race condition in attributes creation during SVM compilation
This commit is contained in:
parent
3ce30823ff
commit
52029e689c
2 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue