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:
@@ -32,12 +32,12 @@ namespace Nz
|
||||
supportedStageType |= stageType;
|
||||
};
|
||||
|
||||
callbacks.onOptionDeclaration = [&](const std::string& optionName, const ShaderAst::ExpressionValue<ShaderAst::ExpressionType>& optionType)
|
||||
callbacks.onOptionDeclaration = [&](const ShaderAst::DeclareOptionStatement& option)
|
||||
{
|
||||
//TODO: Check optionType
|
||||
|
||||
m_optionIndexByName[optionName] = Option{
|
||||
CRC32(optionName)
|
||||
m_optionIndexByName[option.optName] = Option{
|
||||
CRC32(option.optName)
|
||||
};
|
||||
|
||||
optionCount++;
|
||||
|
||||
Reference in New Issue
Block a user