Merge pull request #86744 from Listwon/custom-shader-compilation-determinism
[3.x] Prevent shuffling custom shader functions (shader cache requires determinism)
This commit is contained in:
@ -3405,7 +3405,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
||||
//add to current function as dependency
|
||||
for (int j = 0; j < shader->functions.size(); j++) {
|
||||
if (shader->functions[j].name == current_function) {
|
||||
shader->functions.write[j].uses_function.insert(name);
|
||||
shader->functions.write[j].uses_function.push_back(name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -602,7 +602,7 @@ public:
|
||||
struct Function {
|
||||
StringName name;
|
||||
FunctionNode *function;
|
||||
Set<StringName> uses_function;
|
||||
Vector<StringName> uses_function;
|
||||
bool callable;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user