Split engine to packages NazaraUtils and NZSL (#375)

* Move code to NazaraUtils and NZSL packages

* Reorder includes

* Tests: Remove glslang and spirv-tools deps

* Tests: Remove glslang init

* Remove NazaraUtils tests and fix Vector4Test

* Fix Linux compilation

* Update msys2-build.yml

* Fix assimp package

* Update xmake.lua

* Update xmake.lua

* Fix shader compilation on MinGW

* Final fixes

* The final fix 2: the fix strikes back!

* Disable cache on CI

* The return of the fix™️
This commit is contained in:
Jérôme Leclercq
2022-05-25 19:36:10 +02:00
committed by GitHub
parent 3f8f1c4653
commit 03e2801dbe
483 changed files with 1139 additions and 59112 deletions

View File

@@ -1,11 +1,11 @@
#include <ShaderNode/DataModels/BufferField.hpp>
#include <Nazara/Core/CallOnExit.hpp>
#include <Nazara/Utils/CallOnExit.hpp>
#include <ShaderNode/ShaderGraph.hpp>
#include <ShaderNode/DataTypes/BoolData.hpp>
#include <ShaderNode/DataTypes/FloatData.hpp>
#include <ShaderNode/DataTypes/Matrix4Data.hpp>
#include <ShaderNode/DataTypes/VecData.hpp>
#include <Nazara/Shader/ShaderBuilder.hpp>
#include <NZSL/ShaderBuilder.hpp>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QFormLayout>
#include <iostream>
@@ -49,7 +49,7 @@ ShaderNode(graph)
UpdatePreview();
}
Nz::ShaderAst::NodePtr BufferField::BuildNode(Nz::ShaderAst::ExpressionPtr* expressions, std::size_t count, std::size_t outputIndex) const
nzsl::Ast::NodePtr BufferField::BuildNode(nzsl::Ast::ExpressionPtr* expressions, std::size_t count, std::size_t outputIndex) const
{
assert(count == 0);
assert(outputIndex == 0);
@@ -65,7 +65,7 @@ Nz::ShaderAst::NodePtr BufferField::BuildNode(Nz::ShaderAst::ExpressionPtr* expr
assert(m_currentFieldIndex);
const CurrentField& currentField = *m_currentFieldIndex;
Nz::ShaderAst::ExpressionPtr sourceExpr = Nz::ShaderBuilder::Identifier(bufferEntry.name);
nzsl::Ast::ExpressionPtr sourceExpr = nzsl::ShaderBuilder::Identifier(bufferEntry.name);
std::vector<std::string> memberIdentifiers;
memberIdentifiers.reserve(currentField.nestedFields.size() + 1);
@@ -89,8 +89,7 @@ Nz::ShaderAst::NodePtr BufferField::BuildNode(Nz::ShaderAst::ExpressionPtr* expr
memberIdentifiers.push_back(memberEntry.name);
using namespace Nz;
return ShaderBuilder::AccessMember(std::move(sourceExpr), std::move(memberIdentifiers));
return nzsl::ShaderBuilder::AccessMember(std::move(sourceExpr), std::move(memberIdentifiers));
}
unsigned int BufferField::nPorts(QtNodes::PortType portType) const