diff options
-rw-r--r-- | intern/cycles/render/nodes.cpp | 1 | ||||
-rw-r--r-- | intern/cycles/util/util_progress.h | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index afc59098432..57fe2fb01b7 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -1731,7 +1731,6 @@ void LightFalloffNode::compile(SVMCompiler& compiler) compiler.stack_assign(out); compiler.add_node(NODE_LIGHT_FALLOFF, NODE_LIGHT_FALLOFF_LINEAR, compiler.encode_uchar4(strength_in->stack_offset, smooth_in->stack_offset, out->stack_offset)); - compiler.add_node(NODE_LIGHT_FALLOFF, NODE_LIGHT_FALLOFF_LINEAR, out->stack_offset); } out = output("Constant"); diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h index 2cc2995bcfe..c63aa841c52 100644 --- a/intern/cycles/util/util_progress.h +++ b/intern/cycles/util/util_progress.h @@ -153,8 +153,10 @@ public: void set_update() { - if(update_cb) + if(update_cb) { + thread_scoped_lock lock(update_mutex); update_cb(); + } } void set_update_callback(boost::function<void(void)> function) @@ -164,6 +166,7 @@ public: protected: thread_mutex progress_mutex; + thread_mutex update_mutex; boost::function<void(void)> update_cb; boost::function<void(void)> cancel_cb; |