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>2015-11-25 11:07:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-11-25 11:07:32 +0300
commit443b159f023a872472d8e61c7270dab472a3d8ee (patch)
tree011015dbde30f6adc8b95c2710e2e5a5f13ca528 /intern/cycles/render/osl.h
parentde35827612f85511aed50b9f05953ad857fe7e1c (diff)
Cycles: Ensure order of shader nodes in the dependnecies set
The issue was than nodes dependencies were stored as set<ShaderNode*> which is actually a so called "strict weak ordered", meaning order of nodes in the set is strictly defined, but based on the ShaderNode pointer. This means that between different render invokations order of original nodes could be different due to different pointers allocated for ShaderNode. This commit makes it so dependencies and maps used for ShaderNodes are based on the node->id which has much more predictable order. It's still possible to trick the system by doing some crazy edits during viewport rendfer and cause difference between viewport and final render stacks. Reviewers: brecht Reviewed By: brecht Subscribers: LazyDodo Differential Revision: https://developer.blender.org/D1630
Diffstat (limited to 'intern/cycles/render/osl.h')
-rw-r--r--intern/cycles/render/osl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h
index e915f830202..3ff37c56e50 100644
--- a/intern/cycles/render/osl.h
+++ b/intern/cycles/render/osl.h
@@ -21,6 +21,7 @@
#include "util_string.h"
#include "util_thread.h"
+#include "graph.h"
#include "shader.h"
#ifdef WITH_OSL
@@ -149,8 +150,8 @@ private:
string compatible_name(ShaderNode *node, ShaderInput *input);
string compatible_name(ShaderNode *node, ShaderOutput *output);
- void find_dependencies(set<ShaderNode*>& dependencies, ShaderInput *input);
- void generate_nodes(const set<ShaderNode*>& nodes);
+ void find_dependencies(ShaderNodeSet& dependencies, ShaderInput *input);
+ void generate_nodes(const ShaderNodeSet& nodes);
#endif
void *shadingsys;