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,6 +1,6 @@
#include <ShaderNode/DataModels/VecFloatMul.hpp>
#include <Nazara/Shader/ShaderBuilder.hpp>
#include <Nazara/Shader/Ast/Nodes.hpp>
#include <NZSL/ShaderBuilder.hpp>
#include <NZSL/Ast/Nodes.hpp>
VecFloatMul::VecFloatMul(ShaderGraph& graph) :
ShaderNode(graph)
@@ -8,12 +8,12 @@ ShaderNode(graph)
UpdateOutput();
}
Nz::ShaderAst::NodePtr VecFloatMul::BuildNode(Nz::ShaderAst::ExpressionPtr* expressions, std::size_t count, std::size_t outputIndex) const
nzsl::Ast::NodePtr VecFloatMul::BuildNode(nzsl::Ast::ExpressionPtr* expressions, std::size_t count, std::size_t outputIndex) const
{
assert(count == 2);
assert(outputIndex == 0);
return Nz::ShaderBuilder::Binary(Nz::ShaderAst::BinaryType::Multiply, std::move(expressions[0]), std::move(expressions[1]));
return nzsl::ShaderBuilder::Binary(nzsl::Ast::BinaryType::Multiply, std::move(expressions[0]), std::move(expressions[1]));
}
QString VecFloatMul::caption() const
@@ -142,7 +142,7 @@ void VecFloatMul::UpdateOutput()
{
m_output = std::make_shared<VecData>(4);
m_output->preview = PreviewValues(1, 1);
m_output->preview.Fill(Nz::Vector4f::Zero());
m_output->preview.Fill(nzsl::Vector4f(0.f, 0.f, 0.f, 0.f));
return;
}
@@ -164,9 +164,9 @@ void VecFloatMul::UpdateOutput()
m_output->preview = PreviewValues(maxWidth, maxHeight);
const Nz::Vector4f* left = leftResized.GetData();
const Nz::Vector4f* right = rightPreview.GetData();
Nz::Vector4f* output = m_output->preview.GetData();
const nzsl::Vector4f* left = leftResized.GetData();
const nzsl::Vector4f* right = rightPreview.GetData();
nzsl::Vector4f* output = m_output->preview.GetData();
std::size_t pixelCount = maxWidth * maxHeight;
for (std::size_t i = 0; i < pixelCount; ++i)