Cycles: Fix shader update bug introduced by recent commits

Seems set_intersection() requires passing explicit comparator if non-default
one is used for the sets. A bit weird, but can't really find another explanation
here about whats' going on here.
This commit is contained in:
Sergey Sharybin 2015-11-25 16:04:45 +05:00
parent 00afa02528
commit 328208a6a6
1 changed files with 7 additions and 3 deletions

View File

@ -528,9 +528,11 @@ void SVMCompiler::generate_multi_closure(ShaderNode *root_node,
find_dependencies(cl1deps, done, cl1in);
find_dependencies(cl2deps, done, cl2in);
ShaderNodeIDComparator node_id_comp;
set_intersection(cl1deps.begin(), cl1deps.end(),
cl2deps.begin(), cl2deps.end(),
std::inserter(shareddeps, shareddeps.begin()));
std::inserter(shareddeps, shareddeps.begin()),
node_id_comp);
/* it's possible some nodes are not shared between this mix node
* inputs, but still needed to be always executed, this mainly
@ -542,10 +544,12 @@ void SVMCompiler::generate_multi_closure(ShaderNode *root_node,
find_dependencies(rootdeps, done, in, node);
set_intersection(rootdeps.begin(), rootdeps.end(),
cl1deps.begin(), cl1deps.end(),
std::inserter(shareddeps, shareddeps.begin()));
std::inserter(shareddeps, shareddeps.begin()),
node_id_comp);
set_intersection(rootdeps.begin(), rootdeps.end(),
cl2deps.begin(), cl2deps.end(),
std::inserter(shareddeps, shareddeps.begin()));
std::inserter(shareddeps, shareddeps.begin()),
node_id_comp);
}
}