Shader: Move attribute parsing to parser, simplifying writer code

This commit is contained in:
Jérôme Leclercq
2021-04-14 11:34:21 +02:00
parent bca1561f73
commit aababb205f
14 changed files with 910 additions and 1046 deletions

View File

@@ -45,7 +45,6 @@ namespace Nz::ShaderAst
StatementPtr AstCloner::Clone(DeclareExternalStatement& node)
{
auto clone = std::make_unique<DeclareExternalStatement>();
clone->attributes = node.attributes;
clone->externalVars = node.externalVars;
clone->varIndex = node.varIndex;
@@ -55,7 +54,7 @@ namespace Nz::ShaderAst
StatementPtr AstCloner::Clone(DeclareFunctionStatement& node)
{
auto clone = std::make_unique<DeclareFunctionStatement>();
clone->attributes = node.attributes;
clone->entryStage = node.entryStage;
clone->funcIndex = node.funcIndex;
clone->name = node.name;
clone->parameters = node.parameters;