Ended up moving lock in the more centralized space since multiple shaders
can access this map.
uint ShaderManager::get_attribute_id(ustring name)
{
+ thread_scoped_spin_lock lock(attribute_lock_);
+
/* get a unique id for each name, for SVM attribute lookup */
AttributeIDMap::iterator it = unique_attribute_id.find(name);
void get_requested_graph_features(ShaderGraph *graph,
DeviceRequestedFeatures *requested_features);
+
+ thread_spin_lock attribute_lock_;
};
CCL_NAMESPACE_END
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);
}
int max_stack_use;
uint mix_weight_offset;
bool compile_failed;
-
- thread_spin_lock attribute_lock_;
};
CCL_NAMESPACE_END