Shader/ShaderAstOptimizer: Fix branch optimization

This commit is contained in:
Jérôme Leclercq 2021-01-15 19:19:19 +01:00
parent bb18ca13ca
commit 711199fe51
1 changed files with 6 additions and 0 deletions

View File

@ -470,6 +470,12 @@ namespace Nz
break;
}
}
else
{
auto& c = statements.emplace_back();
c.condition = std::move(cond);
c.statement = CloneStatement(condStatement.statement);
}
}
if (statements.empty())