Shader: Cleanup and rename AST files

This commit is contained in:
Jérôme Leclercq
2021-04-15 13:38:14 +02:00
parent afe3a0ea93
commit d335d44d6a
62 changed files with 105 additions and 141 deletions

View File

@@ -6,10 +6,10 @@
#include <Nazara/Core/MemoryView.hpp>
#include <Nazara/OpenGLRenderer/Utils.hpp>
#include <Nazara/Shader/GlslWriter.hpp>
#include <Nazara/Shader/ShaderAstCloner.hpp>
#include <Nazara/Shader/ShaderAstSerializer.hpp>
#include <Nazara/Shader/ShaderLangLexer.hpp>
#include <Nazara/Shader/ShaderLangParser.hpp>
#include <Nazara/Shader/Ast/AstCloner.hpp>
#include <Nazara/Shader/Ast/AstSerializer.hpp>
#include <stdexcept>
#include <Nazara/OpenGLRenderer/Debug.hpp>

View File

@@ -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 <stdexcept>
#include <Nazara/Shader/Debug.hpp>
@@ -287,7 +287,7 @@ namespace Nz::ShaderAst
PushStatement(Clone(node)); \
}
#include <Nazara/Shader/ShaderAstNodes.hpp>
#include <Nazara/Shader/Ast/AstNodeList.hpp>
void AstCloner::PushExpression(ExpressionPtr expression)
{

View File

@@ -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/ShaderAstExpressionVisitor.hpp>
#include <Nazara/Shader/Ast/AstExpressionVisitor.hpp>
#include <Nazara/Shader/Debug.hpp>
namespace Nz::ShaderAst

View File

@@ -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/ShaderAstExpressionVisitorExcept.hpp>
#include <Nazara/Shader/Ast/AstExpressionVisitorExcept.hpp>
#include <Nazara/Shader/Debug.hpp>
namespace Nz::ShaderAst
@@ -11,5 +11,5 @@ namespace Nz::ShaderAst
{ \
throw std::runtime_error("unexpected " #Node " node"); \
}
#include <Nazara/Shader/ShaderAstNodes.hpp>
#include <Nazara/Shader/Ast/AstNodeList.hpp>
}

View File

@@ -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/ShaderBuilder.hpp>
#include <cassert>
#include <stdexcept>

View File

@@ -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::ShaderAst

View File

@@ -2,9 +2,9 @@
// 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/ShaderAstExpressionVisitor.hpp>
#include <Nazara/Shader/ShaderAstStatementVisitor.hpp>
#include <Nazara/Shader/Ast/AstSerializer.hpp>
#include <Nazara/Shader/Ast/AstExpressionVisitor.hpp>
#include <Nazara/Shader/Ast/AstStatementVisitor.hpp>
#include <Nazara/Shader/Debug.hpp>
namespace Nz::ShaderAst
@@ -26,7 +26,7 @@ namespace Nz::ShaderAst
{ \
m_serializer.Serialize(node); \
}
#include <Nazara/Shader/ShaderAstNodes.hpp>
#include <Nazara/Shader/Ast/AstNodeList.hpp>
private:
AstSerializerBase& m_serializer;
@@ -444,7 +444,7 @@ namespace Nz::ShaderAst
case NodeType::None: break;
#define NAZARA_SHADERAST_EXPRESSION(Node) case NodeType:: Node : node = std::make_unique<Node>(); break;
#include <Nazara/Shader/ShaderAstNodes.hpp>
#include <Nazara/Shader/Ast/AstNodeList.hpp>
default: throw std::runtime_error("unexpected node type");
}
@@ -470,7 +470,7 @@ namespace Nz::ShaderAst
case NodeType::None: break;
#define NAZARA_SHADERAST_STATEMENT(Node) case NodeType:: Node : node = std::make_unique<Node>(); break;
#include <Nazara/Shader/ShaderAstNodes.hpp>
#include <Nazara/Shader/Ast/AstNodeList.hpp>
default: throw std::runtime_error("unexpected node type");
}

View File

@@ -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/ShaderAstStatementVisitor.hpp>
#include <Nazara/Shader/Ast/AstStatementVisitor.hpp>
#include <Nazara/Shader/Debug.hpp>
namespace Nz::ShaderAst

View File

@@ -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/ShaderAstStatementVisitorExcept.hpp>
#include <Nazara/Shader/Ast/AstStatementVisitorExcept.hpp>
#include <Nazara/Shader/Debug.hpp>
namespace Nz::ShaderAst
@@ -11,5 +11,5 @@ namespace Nz::ShaderAst
{ \
throw std::runtime_error("unexpected " #Node " node"); \
}
#include <Nazara/Shader/ShaderAstNodes.hpp>
#include <Nazara/Shader/Ast/AstNodeList.hpp>
}

View File

@@ -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

View File

@@ -2,10 +2,10 @@
// 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/Core/Algorithm.hpp>
#include <Nazara/Shader/ShaderAstExpressionVisitor.hpp>
#include <Nazara/Shader/ShaderAstStatementVisitor.hpp>
#include <Nazara/Shader/Ast/AstExpressionVisitor.hpp>
#include <Nazara/Shader/Ast/AstStatementVisitor.hpp>
#include <Nazara/Shader/Debug.hpp>
namespace Nz::ShaderAst
@@ -16,7 +16,7 @@ namespace Nz::ShaderAst
{ \
return NodeType:: Node; \
}
#include <Nazara/Shader/ShaderAstNodes.hpp>
#include <Nazara/Shader/Ast/AstNodeList.hpp>
#define NAZARA_SHADERAST_EXPRESSION(Node) void Node::Visit(AstExpressionVisitor& visitor) \
{\
@@ -28,5 +28,5 @@ namespace Nz::ShaderAst
visitor.Visit(*this); \
}
#include <Nazara/Shader/ShaderAstNodes.hpp>
#include <Nazara/Shader/Ast/AstNodeList.hpp>
}

View File

@@ -5,7 +5,7 @@
#include <Nazara/Shader/Ast/SanitizeVisitor.hpp>
#include <Nazara/Core/CallOnExit.hpp>
#include <Nazara/Core/StackArray.hpp>
#include <Nazara/Shader/ShaderAstUtils.hpp>
#include <Nazara/Shader/Ast/AstUtils.hpp>
#include <stdexcept>
#include <unordered_set>
#include <Nazara/Shader/Debug.hpp>

View File

@@ -7,9 +7,9 @@
#include <Nazara/Core/CallOnExit.hpp>
#include <Nazara/Math/Algorithm.hpp>
#include <Nazara/Shader/ShaderBuilder.hpp>
#include <Nazara/Shader/ShaderAstCloner.hpp>
#include <Nazara/Shader/ShaderAstRecursiveVisitor.hpp>
#include <Nazara/Shader/ShaderAstUtils.hpp>
#include <Nazara/Shader/Ast/AstCloner.hpp>
#include <Nazara/Shader/Ast/AstRecursiveVisitor.hpp>
#include <Nazara/Shader/Ast/AstUtils.hpp>
#include <Nazara/Shader/Ast/SanitizeVisitor.hpp>
#include <optional>
#include <stdexcept>

View File

@@ -5,13 +5,13 @@
#include <Nazara/Shader/SpirvWriter.hpp>
#include <Nazara/Core/CallOnExit.hpp>
#include <Nazara/Core/StackVector.hpp>
#include <Nazara/Shader/ShaderAstCloner.hpp>
#include <Nazara/Shader/ShaderAstRecursiveVisitor.hpp>
#include <Nazara/Shader/SpirvAstVisitor.hpp>
#include <Nazara/Shader/SpirvBlock.hpp>
#include <Nazara/Shader/SpirvConstantCache.hpp>
#include <Nazara/Shader/SpirvData.hpp>
#include <Nazara/Shader/SpirvSection.hpp>
#include <Nazara/Shader/Ast/AstCloner.hpp>
#include <Nazara/Shader/Ast/AstRecursiveVisitor.hpp>
#include <Nazara/Shader/Ast/SanitizeVisitor.hpp>
#include <tsl/ordered_map.h>
#include <tsl/ordered_set.h>

View File

@@ -3,11 +3,11 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/VulkanRenderer/VulkanShaderModule.hpp>
#include <Nazara/Shader/ShaderAstSerializer.hpp>
#include <Nazara/Shader/ShaderLangLexer.hpp>
#include <Nazara/Shader/ShaderLangParser.hpp>
#include <Nazara/Shader/SpirvDecoder.hpp>
#include <Nazara/Shader/SpirvWriter.hpp>
#include <Nazara/Shader/Ast/AstSerializer.hpp>
#include <Nazara/VulkanRenderer/Debug.hpp>
namespace Nz

View File

@@ -1,6 +1,6 @@
#include <ShaderNode/DataModels/Mat4VecMul.hpp>
#include <Nazara/Shader/ShaderBuilder.hpp>
#include <Nazara/Shader/ShaderNodes.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
Mat4VecMul::Mat4VecMul(ShaderGraph& graph) :
ShaderNode(graph)

View File

@@ -4,7 +4,7 @@
#define NAZARA_SHADERNODES_SHADERNODE_HPP
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Shader/ShaderNodes.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
#include <nodes/NodeDataModel>
#include <QtGui/QPixmap>
#include <optional>

View File

@@ -1,6 +1,6 @@
#include <ShaderNode/DataModels/VecDot.hpp>
#include <Nazara/Shader/ShaderBuilder.hpp>
#include <Nazara/Shader/ShaderNodes.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
VecDot::VecDot(ShaderGraph& graph) :
ShaderNode(graph)

View File

@@ -1,6 +1,6 @@
#include <ShaderNode/DataModels/VecFloatMul.hpp>
#include <Nazara/Shader/ShaderBuilder.hpp>
#include <Nazara/Shader/ShaderNodes.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
VecFloatMul::VecFloatMul(ShaderGraph& graph) :
ShaderNode(graph)

View File

@@ -3,7 +3,7 @@
#ifndef NAZARA_SHADERNODES_MATRIXDATA_HPP
#define NAZARA_SHADERNODES_MATRIXDATA_HPP
#include <Nazara/Shader/ShaderNodes.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
#include <ShaderNode/Previews/PreviewValues.hpp>
#include <nodes/NodeData>

View File

@@ -4,7 +4,7 @@
#define NAZARA_SHADERNODES_TEXTUREDATA_HPP
#include <ShaderNode/Previews/PreviewValues.hpp>
#include <Nazara/Shader/ShaderNodes.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
#include <nodes/NodeData>
struct TextureData : public QtNodes::NodeData

View File

@@ -3,7 +3,7 @@
#ifndef NAZARA_SHADERNODES_VECDATA_HPP
#define NAZARA_SHADERNODES_VECDATA_HPP
#include <Nazara/Shader/ShaderNodes.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
#include <ShaderNode/Previews/PreviewValues.hpp>
#include <nodes/NodeData>

View File

@@ -1,8 +1,8 @@
#include <ShaderNode/ShaderGraph.hpp>
#include <Nazara/Core/StackArray.hpp>
#include <Nazara/Shader/Ast/AstCloner.hpp>
#include <Nazara/Shader/Ast/AstUtils.hpp>
#include <Nazara/Shader/Ast/ExpressionType.hpp>
#include <Nazara/Shader/ShaderAstCloner.hpp>
#include <Nazara/Shader/ShaderAstUtils.hpp>
#include <ShaderNode/DataModels/BinOp.hpp>
#include <ShaderNode/DataModels/BoolValue.hpp>
#include <ShaderNode/DataModels/BufferField.hpp>

View File

@@ -5,7 +5,7 @@
#include <Nazara/Core/Signal.hpp>
#include <Nazara/Utility/Enums.hpp>
#include <Nazara/Shader/ShaderNodes.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
#include <nodes/FlowScene>
#include <ShaderNode/Enums.hpp>
#include <ShaderNode/Previews/PreviewModel.hpp>

View File

@@ -1,6 +1,6 @@
#include <ShaderNode/Widgets/CodeOutputWidget.hpp>
#include <Nazara/Shader/GlslWriter.hpp>
#include <Nazara/Shader/ShaderAstOptimizer.hpp>
#include <Nazara/Shader/Ast/AstOptimizer.hpp>
#include <Nazara/Shader/SpirvPrinter.hpp>
#include <Nazara/Shader/SpirvWriter.hpp>
#include <ShaderNode/ShaderGraph.hpp>

View File

@@ -1,7 +1,7 @@
#include <ShaderNode/Widgets/MainWindow.hpp>
#include <Nazara/Core/File.hpp>
#include <Nazara/Shader/GlslWriter.hpp>
#include <Nazara/Shader/ShaderAstSerializer.hpp>
#include <Nazara/Shader/Ast/AstSerializer.hpp>
#include <ShaderNode/ShaderGraph.hpp>
#include <ShaderNode/Widgets/BufferEditor.hpp>
#include <ShaderNode/Widgets/CodeOutputWidget.hpp>