Shader: Replace const for with [unroll] attribute

This commit is contained in:
Jérôme Leclercq
2022-01-03 20:21:09 +01:00
parent b6e4a9470e
commit 2bdcc045cd
13 changed files with 204 additions and 87 deletions

View File

@@ -269,11 +269,9 @@ namespace Nz::ShaderBuilder
return expressionStatementNode;
}
template<bool Const>
std::unique_ptr<ShaderAst::ForEachStatement> Impl::ForEach<Const>::operator()(std::string varName, ShaderAst::ExpressionPtr expression, ShaderAst::StatementPtr statement) const
std::unique_ptr<ShaderAst::ForEachStatement> Impl::ForEach::operator()(std::string varName, ShaderAst::ExpressionPtr expression, ShaderAst::StatementPtr statement) const
{
auto forEachNode = std::make_unique<ShaderAst::ForEachStatement>();
forEachNode->isConst = Const;
forEachNode->expression = std::move(expression);
forEachNode->statement = std::move(statement);
forEachNode->varName = std::move(varName);