Shader/SanitizeVisitor: Fix an issue when double-sanitizing

... with differents parameters (like reducing loops to while, which introduces new variables which would take over existing var indices)
This commit is contained in:
Jérôme Leclercq
2022-03-10 12:44:47 +01:00
parent bf7f06ac4c
commit 98bd04e35a
5 changed files with 174 additions and 7 deletions

View File

@@ -124,6 +124,7 @@ namespace Nz::ShaderAst
template<typename T> const T& ComputeExprValue(ExpressionValue<T>& attribute) const;
template<typename T> std::unique_ptr<T> PropagateConstants(T& node) const;
void PreregisterIndices(const Module& module);
void PropagateFunctionFlags(std::size_t funcIndex, FunctionFlags flags, Bitset<>& seen);
void RegisterBuiltin();