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

@@ -7,7 +7,7 @@
#ifndef NAZARA_RENDERER_ENUMS_HPP
#define NAZARA_RENDERER_ENUMS_HPP
#include <Nazara/Core/Flags.hpp>
#include <Nazara/Utils/Flags.hpp>
namespace Nz
{

View File

@@ -8,8 +8,8 @@
#define NAZARA_RENDERER_RENDERBUFFERVIEW_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Core/MovablePtr.hpp>
#include <Nazara/Renderer/RenderBuffer.hpp>
#include <Nazara/Utils/MovablePtr.hpp>
namespace Nz
{

View File

@@ -18,9 +18,9 @@
#include <Nazara/Renderer/RenderPipelineLayout.hpp>
#include <Nazara/Renderer/Texture.hpp>
#include <Nazara/Renderer/TextureSampler.hpp>
#include <Nazara/Shader/ShaderWriter.hpp>
#include <Nazara/Shader/Ast/Module.hpp>
#include <Nazara/Utility/PixelFormat.hpp>
#include <NZSL/ShaderWriter.hpp>
#include <NZSL/Ast/Module.hpp>
#include <memory>
#include <string>
@@ -44,9 +44,9 @@ namespace Nz
virtual std::shared_ptr<RenderPass> InstantiateRenderPass(std::vector<RenderPass::Attachment> attachments, std::vector<RenderPass::SubpassDescription> subpassDescriptions, std::vector<RenderPass::SubpassDependency> subpassDependencies) = 0;
virtual std::shared_ptr<RenderPipeline> InstantiateRenderPipeline(RenderPipelineInfo pipelineInfo) = 0;
virtual std::shared_ptr<RenderPipelineLayout> InstantiateRenderPipelineLayout(RenderPipelineLayoutInfo pipelineLayoutInfo) = 0;
virtual std::shared_ptr<ShaderModule> InstantiateShaderModule(ShaderStageTypeFlags shaderStages, const ShaderAst::Module& shaderModule, const ShaderWriter::States& states) = 0;
virtual std::shared_ptr<ShaderModule> InstantiateShaderModule(ShaderStageTypeFlags shaderStages, ShaderLanguage lang, const void* source, std::size_t sourceSize, const ShaderWriter::States& states) = 0;
std::shared_ptr<ShaderModule> InstantiateShaderModule(ShaderStageTypeFlags shaderStages, ShaderLanguage lang, const std::filesystem::path& sourcePath, const ShaderWriter::States& states);
virtual std::shared_ptr<ShaderModule> InstantiateShaderModule(nzsl::ShaderStageTypeFlags shaderStages, const nzsl::Ast::Module& shaderModule, const nzsl::ShaderWriter::States& states) = 0;
virtual std::shared_ptr<ShaderModule> InstantiateShaderModule(nzsl::ShaderStageTypeFlags shaderStages, ShaderLanguage lang, const void* source, std::size_t sourceSize, const nzsl::ShaderWriter::States& states) = 0;
std::shared_ptr<ShaderModule> InstantiateShaderModule(nzsl::ShaderStageTypeFlags shaderStages, ShaderLanguage lang, const std::filesystem::path& sourcePath, const nzsl::ShaderWriter::States& states);
virtual std::shared_ptr<Texture> InstantiateTexture(const TextureInfo& params) = 0;
virtual std::shared_ptr<TextureSampler> InstantiateTextureSampler(const TextureSamplerInfo& params) = 0;

View File

@@ -4,7 +4,7 @@
#include <Nazara/Renderer/RenderImage.hpp>
#include <Nazara/Core/Algorithm.hpp>
#include <Nazara/Core/MemoryHelper.hpp>
#include <Nazara/Utils/MemoryHelper.hpp>
#include <Nazara/Renderer/Debug.hpp>
namespace Nz

View File

@@ -7,10 +7,10 @@
#ifndef NAZARA_RENDERER_RENDERPIPELINELAYOUT_HPP
#define NAZARA_RENDERER_RENDERPIPELINELAYOUT_HPP
#include <Nazara/Core/MovablePtr.hpp>
#include <Nazara/Renderer/Enums.hpp>
#include <Nazara/Renderer/ShaderBinding.hpp>
#include <Nazara/Shader/Enums.hpp>
#include <Nazara/Utils/MovablePtr.hpp>
#include <NZSL/Enums.hpp>
#include <memory>
#include <string>
#include <vector>
@@ -24,7 +24,7 @@ namespace Nz
UInt32 setIndex = 0;
UInt32 bindingIndex;
ShaderBindingType type;
ShaderStageTypeFlags shaderStageFlags;
nzsl::ShaderStageTypeFlags shaderStageFlags;
};
std::vector<Binding> bindings;

View File

@@ -8,9 +8,9 @@
#define NAZARA_RENDERER_RENDERTARGET_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Core/Signal.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Renderer/Config.hpp>
#include <Nazara/Utils/Signal.hpp>
namespace Nz
{

View File

@@ -13,7 +13,6 @@
#include <Nazara/Renderer/Config.hpp>
#include <Nazara/Renderer/Enums.hpp>
#include <Nazara/Renderer/RendererImpl.hpp>
#include <Nazara/Shader/Shader.hpp>
namespace Nz
{
@@ -24,7 +23,7 @@ namespace Nz
friend ModuleBase;
public:
using Dependencies = TypeList<Platform, Shader>;
using Dependencies = TypeList<Platform>;
struct Config;