Shader: Cleanup and rename AST files
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstExpressionVisitor.hpp>
|
||||
#include <Nazara/Shader/ShaderAstStatementVisitor.hpp>
|
||||
#include <Nazara/Shader/Ast/AstExpressionVisitor.hpp>
|
||||
#include <Nazara/Shader/Ast/AstStatementVisitor.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
@@ -61,7 +61,7 @@ namespace Nz::ShaderAst
|
||||
virtual StatementPtr Clone(ReturnStatement& node);
|
||||
|
||||
#define NAZARA_SHADERAST_NODE(NodeType) void Visit(NodeType& node) override;
|
||||
#include <Nazara/Shader/ShaderAstNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/AstNodeList.hpp>
|
||||
|
||||
void PushExpression(ExpressionPtr expression);
|
||||
void PushStatement(StatementPtr statement);
|
||||
@@ -78,6 +78,6 @@ namespace Nz::ShaderAst
|
||||
inline StatementPtr Clone(StatementPtr& node);
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/ShaderAstCloner.inl>
|
||||
#include <Nazara/Shader/Ast/AstCloner.inl>
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Shader generator"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Shader/ShaderAstCloner.hpp>
|
||||
#include <Nazara/Shader/Ast/AstCloner.hpp>
|
||||
#include <Nazara/Shader/Debug.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_SHADERASTEXPRESSIONVISITOR_HPP
|
||||
#define NAZARA_SHADERASTEXPRESSIONVISITOR_HPP
|
||||
#ifndef NAZARA_SHADER_AST_EXPRESSIONVISITOR_HPP
|
||||
#define NAZARA_SHADER_AST_EXPRESSIONVISITOR_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
@@ -21,8 +21,8 @@ namespace Nz::ShaderAst
|
||||
AstExpressionVisitor(AstExpressionVisitor&&) = delete;
|
||||
virtual ~AstExpressionVisitor();
|
||||
|
||||
#define NAZARA_SHADERAST_EXPRESSION(NodeType) virtual void Visit(NodeType& node) = 0;
|
||||
#include <Nazara/Shader/ShaderAstNodes.hpp>
|
||||
#define NAZARA_SHADERAST_EXPRESSION(Node) virtual void Visit(Node& node) = 0;
|
||||
#include <Nazara/Shader/Ast/AstNodeList.hpp>
|
||||
|
||||
AstExpressionVisitor& operator=(const AstExpressionVisitor&) = delete;
|
||||
AstExpressionVisitor& operator=(AstExpressionVisitor&&) = delete;
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstExpressionVisitor.hpp>
|
||||
#include <Nazara/Shader/Ast/AstExpressionVisitor.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
@@ -19,7 +19,7 @@ namespace Nz::ShaderAst
|
||||
using AstExpressionVisitor::Visit;
|
||||
|
||||
#define NAZARA_SHADERAST_EXPRESSION(Node) void Visit(ShaderAst::Node& node) override;
|
||||
#include <Nazara/Shader/ShaderAstNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/AstNodeList.hpp>
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstCloner.hpp>
|
||||
#include <Nazara/Shader/Ast/AstCloner.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
@@ -42,6 +42,6 @@ namespace Nz::ShaderAst
|
||||
};
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/ShaderAstOptimizer.inl>
|
||||
#include <Nazara/Shader/Ast/AstOptimizer.inl>
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Shader generator"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Shader/ShaderAstOptimizer.hpp>
|
||||
#include <Nazara/Shader/Ast/AstOptimizer.hpp>
|
||||
#include <Nazara/Shader/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstExpressionVisitor.hpp>
|
||||
#include <Nazara/Shader/ShaderAstStatementVisitor.hpp>
|
||||
#include <Nazara/Shader/Ast/AstExpressionVisitor.hpp>
|
||||
#include <Nazara/Shader/Ast/AstStatementVisitor.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
@@ -46,6 +46,6 @@ namespace Nz::ShaderAst
|
||||
};
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/ShaderAstRecursiveVisitor.inl>
|
||||
#include <Nazara/Shader/Ast/AstRecursiveVisitor.inl>
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Shader generator"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Shader/ShaderAstRecursiveVisitor.hpp>
|
||||
#include <Nazara/Shader/Ast/AstRecursiveVisitor.hpp>
|
||||
#include <Nazara/Shader/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <Nazara/Core/ByteArray.hpp>
|
||||
#include <Nazara/Core/ByteStream.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
@@ -144,6 +144,6 @@ namespace Nz::ShaderAst
|
||||
NAZARA_SHADER_API StatementPtr UnserializeShader(ByteStream& stream);
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/ShaderAstSerializer.inl>
|
||||
#include <Nazara/Shader/Ast/AstSerializer.inl>
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Shader generator"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Shader/ShaderAstSerializer.hpp>
|
||||
#include <Nazara/Shader/Ast/AstSerializer.hpp>
|
||||
#include <Nazara/Shader/Debug.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace Nz::ShaderAst
|
||||
virtual ~AstStatementVisitor();
|
||||
|
||||
#define NAZARA_SHADERAST_STATEMENT(NodeType) virtual void Visit(ShaderAst::NodeType& node) = 0;
|
||||
#include <Nazara/Shader/ShaderAstNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/AstNodeList.hpp>
|
||||
|
||||
AstStatementVisitor& operator=(const AstStatementVisitor&) = delete;
|
||||
AstStatementVisitor& operator=(AstStatementVisitor&&) = delete;
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstStatementVisitor.hpp>
|
||||
#include <Nazara/Shader/Ast/AstStatementVisitor.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
@@ -19,7 +19,7 @@ namespace Nz::ShaderAst
|
||||
using AstStatementVisitor::Visit;
|
||||
|
||||
#define NAZARA_SHADERAST_STATEMENT(Node) void Visit(ShaderAst::Node& node) override;
|
||||
#include <Nazara/Shader/ShaderAstNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/AstNodeList.hpp>
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_SHADERASTUTILS_HPP
|
||||
#define NAZARA_SHADERASTUTILS_HPP
|
||||
#ifndef NAZARA_SHADER_AST_UTILS_HPP
|
||||
#define NAZARA_SHADER_AST_UTILS_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderEnums.hpp>
|
||||
#include <Nazara/Shader/ShaderAstExpressionVisitor.hpp>
|
||||
#include <Nazara/Shader/Ast/Enums.hpp>
|
||||
#include <Nazara/Shader/Ast/AstExpressionVisitor.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
@@ -49,6 +49,6 @@ namespace Nz::ShaderAst
|
||||
inline ExpressionCategory GetExpressionCategory(Expression& expression);
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/ShaderAstUtils.inl>
|
||||
#include <Nazara/Shader/Ast/AstUtils.inl>
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Shader generator"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Shader/ShaderAstUtils.hpp>
|
||||
#include <Nazara/Shader/Ast/AstUtils.hpp>
|
||||
#include <Nazara/Shader/Debug.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
@@ -8,7 +8,7 @@
|
||||
#define NAZARA_SHADERAST_ATTRIBUTES_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/ShaderEnums.hpp>
|
||||
#include <Nazara/Shader/Ast/Enums.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_SHADER_ENUMS_HPP
|
||||
#define NAZARA_SHADER_ENUMS_HPP
|
||||
#ifndef NAZARA_SHADER_AST_ENUMS_HPP
|
||||
#define NAZARA_SHADER_AST_ENUMS_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Nz::ShaderAst
|
||||
|
||||
#define NAZARA_SHADERAST_NODE(Node) Node,
|
||||
#define NAZARA_SHADERAST_STATEMENT_LAST(Node) Node, Max = Node
|
||||
#include <Nazara/Shader/ShaderAstNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/AstNodeList.hpp>
|
||||
};
|
||||
|
||||
enum class PrimitiveType
|
||||
@@ -87,20 +87,6 @@ namespace Nz::ShaderAst
|
||||
Third,
|
||||
Fourth
|
||||
};
|
||||
|
||||
enum class VariableType
|
||||
{
|
||||
None = -1,
|
||||
|
||||
BuiltinVariable,
|
||||
InputVariable,
|
||||
LocalVariable,
|
||||
OutputVariable,
|
||||
ParameterVariable,
|
||||
UniformVariable
|
||||
};
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/ShaderEnums.inl>
|
||||
|
||||
#endif // NAZARA_SHADER_ENUMS_HPP
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
#include <Nazara/Shader/ShaderEnums.hpp>
|
||||
#include <Nazara/Shader/Ast/Enums.hpp>
|
||||
#include <Nazara/Shader/Ast/Attribute.hpp>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_SHADER_NODES_HPP
|
||||
#define NAZARA_SHADER_NODES_HPP
|
||||
#ifndef NAZARA_SHADER_AST_NODES_HPP
|
||||
#define NAZARA_SHADER_AST_NODES_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Math/Vector2.hpp>
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <Nazara/Math/Vector4.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/Ast/ConstantValue.hpp>
|
||||
#include <Nazara/Shader/ShaderEnums.hpp>
|
||||
#include <Nazara/Shader/Ast/Enums.hpp>
|
||||
#include <Nazara/Shader/Ast/Attribute.hpp>
|
||||
#include <Nazara/Shader/Ast/ExpressionType.hpp>
|
||||
#include <array>
|
||||
@@ -304,6 +304,6 @@ namespace Nz::ShaderAst
|
||||
inline bool IsStatement(NodeType nodeType);
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/ShaderNodes.inl>
|
||||
#include <Nazara/Shader/Ast/Nodes.inl>
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Shader generator"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Shader/ShaderNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
#include <Nazara/Shader/Debug.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
@@ -18,7 +18,7 @@ namespace Nz::ShaderAst
|
||||
switch (nodeType)
|
||||
{
|
||||
#define NAZARA_SHADERAST_EXPRESSION(Node) case NodeType::Node: return true;
|
||||
#include <Nazara/Shader/ShaderAstNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/AstNodeList.hpp>
|
||||
|
||||
default:
|
||||
return false;
|
||||
@@ -30,7 +30,7 @@ namespace Nz::ShaderAst
|
||||
switch (nodeType)
|
||||
{
|
||||
#define NAZARA_SHADERAST_STATEMENT(Node) case NodeType::Node: return true;
|
||||
#include <Nazara/Shader/ShaderAstNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/AstNodeList.hpp>
|
||||
|
||||
default:
|
||||
return false;
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstCloner.hpp>
|
||||
#include <Nazara/Shader/Ast/AstCloner.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstExpressionVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/ShaderAstStatementVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/ShaderWriter.hpp>
|
||||
#include <Nazara/Shader/Ast/AstExpressionVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/Ast/AstStatementVisitorExcept.hpp>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define NAZARA_SHADER_BUILDER_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/ShaderNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (C) 2020 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Shader generator"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Shader/ShaderEnums.hpp>
|
||||
#include <Nazara/Shader/Debug.hpp>
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/DebugOff.hpp>
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderLangLexer.hpp>
|
||||
#include <Nazara/Shader/ShaderNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
|
||||
namespace Nz::ShaderLang
|
||||
{
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstExpressionVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/ShaderAstStatementVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/Ast/ExpressionType.hpp>
|
||||
#include <Nazara/Shader/SpirvBlock.hpp>
|
||||
#include <Nazara/Shader/Ast/AstExpressionVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/Ast/AstStatementVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/Ast/ExpressionType.hpp>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define NAZARA_SPIRVCONSTANTCACHE_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/ShaderEnums.hpp>
|
||||
#include <Nazara/Shader/Ast/Enums.hpp>
|
||||
#include <Nazara/Shader/Ast/ConstantValue.hpp>
|
||||
#include <Nazara/Shader/Ast/ExpressionType.hpp>
|
||||
#include <Nazara/Shader/SpirvData.hpp>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstExpressionVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/SpirvData.hpp>
|
||||
#include <Nazara/Shader/Ast/AstExpressionVisitorExcept.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/ShaderAstExpressionVisitorExcept.hpp>
|
||||
#include <Nazara/Shader/SpirvData.hpp>
|
||||
#include <Nazara/Shader/Ast/AstExpressionVisitorExcept.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define NAZARA_SPIRVSECTIONBASE_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/ShaderEnums.hpp>
|
||||
#include <Nazara/Shader/Ast/Enums.hpp>
|
||||
#include <Nazara/Shader/SpirvData.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <Nazara/Shader/Ast/ConstantValue.hpp>
|
||||
#include <Nazara/Shader/ShaderNodes.hpp>
|
||||
#include <Nazara/Shader/Ast/Nodes.hpp>
|
||||
#include <Nazara/Shader/ShaderWriter.hpp>
|
||||
#include <Nazara/Shader/SpirvConstantCache.hpp>
|
||||
#include <string>
|
||||
|
||||
Reference in New Issue
Block a user