diff --git a/docs/release-logs/0.4.1.md b/docs/release-logs/0.4.1.md
index ed4cc3bf2..18f7759cf 100644
--- a/docs/release-logs/0.4.1.md
+++ b/docs/release-logs/0.4.1.md
@@ -8,6 +8,7 @@
- Builders are now `constexpr` where possible and are implemented using `deducing this` in place of CRTP, which makes them more lightweight.
- New exceptions with support for `stacktrace` and `source_location`.
- Replace `fmt` with `std::format`. ([See PR #128](https://github.com/crud89/LiteFX/pull/128))
+- Allow static linking to the engine libraries. ([See PR #135](https://github.com/crud89/LiteFX/pull/135))
- The namespace `rtti` has been renamed to `meta`. ([See PR #121](https://github.com/crud89/LiteFX/pull/121))
- Improvements to C++ core guideline conformance. ([See PR #103](https://github.com/crud89/LiteFX/pull/103))
- New event infrastructure. ([See PR #81](https://github.com/crud89/LiteFX/pull/81))
diff --git a/src/AppModel/CMakeLists.txt b/src/AppModel/CMakeLists.txt
index e56745107..702f0934d 100644
--- a/src/AppModel/CMakeLists.txt
+++ b/src/AppModel/CMakeLists.txt
@@ -19,7 +19,7 @@ SET(APP_MODEL_SOURCES
"src/appversion.cpp"
)
-ADD_LIBRARY(${PROJECT_NAME} SHARED
+ADD_LIBRARY(${PROJECT_NAME}
${APP_MODEL_HEADERS}
${APP_MODEL_SOURCES}
)
@@ -50,6 +50,11 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME}
PUBLIC LiteFX.Core LiteFX.Logging
)
+# Pre-define export specifier, to prevent dllimport/dllexport from being be emitted.
+IF(NOT BUILD_SHARED_LIBS)
+ TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PUBLIC -DLITEFX_APPMODEL_API=)
+ENDIF(NOT BUILD_SHARED_LIBS)
+
# Re-use pre-compiled core header.
IF(LITEFX_BUILD_PRECOMPILED_HEADERS)
TARGET_PRECOMPILE_HEADERS(${PROJECT_NAME} REUSE_FROM LiteFX.Core)
diff --git a/src/AppModel/include/litefx/app.hpp b/src/AppModel/include/litefx/app.hpp
index 014b2cd84..bd42fc152 100644
--- a/src/AppModel/include/litefx/app.hpp
+++ b/src/AppModel/include/litefx/app.hpp
@@ -116,7 +116,7 @@ namespace LiteFX {
///
/// The arguments passed to the function.
/// The result of the delegate function call.
- TResult inline invoke(TArgs... args) const {
+ inline TResult invoke(TArgs... args) const {
return m_target(args...);
}
@@ -124,7 +124,7 @@ namespace LiteFX {
/// Returns the unique token of the delegate.
///
/// The unique token of the delegate.
- token_type inline token() const {
+ inline token_type token() const {
return m_token;
}
@@ -134,7 +134,7 @@ namespace LiteFX {
///
/// The arguments passed to the function.
/// The result of the delegate function call.
- TResult inline operator()(TArgs... args) const {
+ inline TResult operator()(TArgs... args) const {
return this->invoke(args...);
}
};
@@ -642,14 +642,14 @@ namespace LiteFX {
public:
///
- constexpr inline void use(UniquePtr&& backend);
+ void use(UniquePtr&& backend);
///
/// Registers a sink for logging.
///
template requires
std::convertible_to
- constexpr inline AppBuilder& logTo(TArgs&&... args) {
+ AppBuilder& logTo(TArgs&&... args) {
auto sink = makeUnique(std::forward(args)...);
Logger::sinkTo(sink.get());
return *this;
@@ -660,7 +660,7 @@ namespace LiteFX {
///
template requires
meta::implements
- constexpr inline AppBuilder& useBackend(TArgs&&... args) {
+ AppBuilder& useBackend(TArgs&&... args) {
this->use(makeUnique(*this->instance(), std::forward(args)...));
return *this;
}
diff --git a/src/AppModel/include/litefx/app_api.hpp b/src/AppModel/include/litefx/app_api.hpp
index 8d553897d..f6bdf6b81 100644
--- a/src/AppModel/include/litefx/app_api.hpp
+++ b/src/AppModel/include/litefx/app_api.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include
+
#if !defined (LITEFX_APPMODEL_API)
# if defined(LiteFX_AppModel_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_APPMODEL_API __declspec(dllexport)
@@ -8,7 +10,7 @@
# elif !defined(LiteFX_AppModel_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_APPMODEL_API __declspec(dllimport)
# endif
-#endif
+#endif
#ifndef LITEFX_APPMODEL_API
# define LITEFX_APPMODEL_API
diff --git a/src/AppModel/src/app.cpp b/src/AppModel/src/app.cpp
index df0536288..2c258328d 100644
--- a/src/AppModel/src/app.cpp
+++ b/src/AppModel/src/app.cpp
@@ -208,7 +208,7 @@ void App::resize(int width, int height)
// Builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr void AppBuilder::use(UniquePtr&& backend)
+void AppBuilder::use(UniquePtr&& backend)
{
this->instance()->use(std::move(backend));
}
\ No newline at end of file
diff --git a/src/Backends/DirectX12/CMakeLists.txt b/src/Backends/DirectX12/CMakeLists.txt
index 10b9c9ae5..3089a60d0 100644
--- a/src/Backends/DirectX12/CMakeLists.txt
+++ b/src/Backends/DirectX12/CMakeLists.txt
@@ -58,7 +58,7 @@ SET(DIRECTX12_BACKEND_SOURCES
)
# Add shared library project.
-ADD_LIBRARY(${PROJECT_NAME} SHARED
+ADD_LIBRARY(${PROJECT_NAME}
${DIRECTX12_BACKEND_HEADERS}
${DIRECTX12_BACKEND_SOURCES}
)
@@ -91,6 +91,11 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME}
PRIVATE unofficial::d3d12-memory-allocator
)
+# Pre-define export specifier, to prevent dllimport/dllexport from being be emitted.
+IF(NOT BUILD_SHARED_LIBS)
+ TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PUBLIC -DLITEFX_DIRECTX12_API=)
+ENDIF(NOT BUILD_SHARED_LIBS)
+
# Link PIX runtime, if available.
IF(LITEFX_BUILD_WITH_PIX_RUNTIME)
FIND_PACKAGE(WinPixEventRuntime CONFIG REQUIRED)
diff --git a/src/Backends/DirectX12/include/litefx/backends/dx12.hpp b/src/Backends/DirectX12/include/litefx/backends/dx12.hpp
index ce9c50852..cca4c5d1d 100644
--- a/src/Backends/DirectX12/include/litefx/backends/dx12.hpp
+++ b/src/Backends/DirectX12/include/litefx/backends/dx12.hpp
@@ -331,44 +331,44 @@ namespace LiteFX::Rendering::Backends {
///
/// The pipeline stage(s) all previous commands have to finish before the barrier is executed.
/// The pipeline stage(s) all subsequent commands are blocked at until the barrier is executed.
- constexpr inline explicit DirectX12Barrier(PipelineStage syncBefore, PipelineStage syncAfter) noexcept;
+ explicit DirectX12Barrier(PipelineStage syncBefore, PipelineStage syncAfter) noexcept;
DirectX12Barrier(const DirectX12Barrier&) = delete;
DirectX12Barrier(DirectX12Barrier&&) = delete;
- constexpr inline virtual ~DirectX12Barrier() noexcept;
+ virtual ~DirectX12Barrier() noexcept;
private:
- constexpr inline explicit DirectX12Barrier() noexcept;
- constexpr inline PipelineStage& syncBefore() noexcept;
- constexpr inline PipelineStage& syncAfter() noexcept;
+ explicit DirectX12Barrier() noexcept;
+ PipelineStage& syncBefore() noexcept;
+ PipelineStage& syncAfter() noexcept;
// Barrier interface.
public:
///
- constexpr inline PipelineStage syncBefore() const noexcept override;
+ PipelineStage syncBefore() const noexcept override;
///
- constexpr inline PipelineStage syncAfter() const noexcept override;
+ PipelineStage syncAfter() const noexcept override;
///
- constexpr inline void wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept override;
+ void wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept override;
///
- constexpr inline void transition(const IDirectX12Buffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) override;
+ void transition(const IDirectX12Buffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) override;
///
- constexpr inline void transition(const IDirectX12Buffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) override;
+ void transition(const IDirectX12Buffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) override;
///
- constexpr inline void transition(const IDirectX12Image& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override;
+ void transition(const IDirectX12Image& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override;
///
- constexpr inline void transition(const IDirectX12Image& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override;
+ void transition(const IDirectX12Image& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override;
///
- constexpr inline void transition(const IDirectX12Image& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override;
+ void transition(const IDirectX12Image& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override;
///
- constexpr inline void transition(const IDirectX12Image& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override;
+ void transition(const IDirectX12Image& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override;
public:
///
@@ -376,7 +376,7 @@ namespace LiteFX::Rendering::Backends {
///
/// The command buffer to add the barriers to.
/// Thrown, if any of the contained barriers is a image barrier that targets a sub-resource range that does not share the same in all sub-resources.
- inline void execute(const DirectX12CommandBuffer& commandBuffer) const noexcept;
+ void execute(const DirectX12CommandBuffer& commandBuffer) const noexcept;
};
///
diff --git a/src/Backends/DirectX12/include/litefx/backends/dx12_api.hpp b/src/Backends/DirectX12/include/litefx/backends/dx12_api.hpp
index 3d4a550ec..3380bf982 100644
--- a/src/Backends/DirectX12/include/litefx/backends/dx12_api.hpp
+++ b/src/Backends/DirectX12/include/litefx/backends/dx12_api.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include
+
#if !defined (LITEFX_DIRECTX12_API)
# if defined(LiteFX_Backends_DirectX12_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_DIRECTX12_API __declspec(dllexport)
@@ -8,7 +10,7 @@
# elif !defined(LiteFX_Backends_DirectX12_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_DIRECTX12_API __declspec(dllimport)
# endif
-#endif
+#endif
#ifndef LITEFX_DIRECTX12_API
# define LITEFX_DIRECTX12_API
@@ -113,109 +115,109 @@ namespace LiteFX::Rendering::Backends {
///
///
///
- constexpr inline Format LITEFX_DIRECTX12_API getFormat(const DXGI_FORMAT& format);
+ Format LITEFX_DIRECTX12_API getFormat(const DXGI_FORMAT& format);
///
///
///
- constexpr inline DXGI_FORMAT LITEFX_DIRECTX12_API getFormat(Format format);
+ DXGI_FORMAT LITEFX_DIRECTX12_API getFormat(Format format);
///
///
///
- constexpr inline DXGI_FORMAT LITEFX_DIRECTX12_API getFormat(BufferFormat format);
+ DXGI_FORMAT LITEFX_DIRECTX12_API getFormat(BufferFormat format);
///
///
///
- constexpr inline bool LITEFX_DIRECTX12_API isSRGB(Format format);
+ bool LITEFX_DIRECTX12_API isSRGB(Format format);
///
///
///
- constexpr inline D3D12_RESOURCE_DIMENSION LITEFX_DIRECTX12_API getImageType(ImageDimensions dimensions);
+ D3D12_RESOURCE_DIMENSION LITEFX_DIRECTX12_API getImageType(ImageDimensions dimensions);
///
///
///
- constexpr inline PolygonMode LITEFX_DIRECTX12_API getPolygonMode(const D3D12_FILL_MODE& mode);
+ PolygonMode LITEFX_DIRECTX12_API getPolygonMode(const D3D12_FILL_MODE& mode);
///
///
///
- constexpr inline D3D12_FILL_MODE LITEFX_DIRECTX12_API getPolygonMode(PolygonMode mode);
+ D3D12_FILL_MODE LITEFX_DIRECTX12_API getPolygonMode(PolygonMode mode);
///
///
///
- constexpr inline CullMode LITEFX_DIRECTX12_API getCullMode(const D3D12_CULL_MODE& mode);
+ CullMode LITEFX_DIRECTX12_API getCullMode(const D3D12_CULL_MODE& mode);
///
///
///
- constexpr inline D3D12_CULL_MODE LITEFX_DIRECTX12_API getCullMode(CullMode mode);
+ D3D12_CULL_MODE LITEFX_DIRECTX12_API getCullMode(CullMode mode);
///
///
///
- constexpr inline PrimitiveTopology LITEFX_DIRECTX12_API getPrimitiveTopology(const D3D12_PRIMITIVE_TOPOLOGY& topology);
+ PrimitiveTopology LITEFX_DIRECTX12_API getPrimitiveTopology(const D3D12_PRIMITIVE_TOPOLOGY& topology);
///
///
///
- constexpr inline D3D12_PRIMITIVE_TOPOLOGY LITEFX_DIRECTX12_API getPrimitiveTopology(PrimitiveTopology topology);
+ D3D12_PRIMITIVE_TOPOLOGY LITEFX_DIRECTX12_API getPrimitiveTopology(PrimitiveTopology topology);
///
///
///
- constexpr inline D3D12_PRIMITIVE_TOPOLOGY_TYPE LITEFX_DIRECTX12_API getPrimitiveTopologyType(PrimitiveTopology topology);
+ D3D12_PRIMITIVE_TOPOLOGY_TYPE LITEFX_DIRECTX12_API getPrimitiveTopologyType(PrimitiveTopology topology);
///
///
///
- constexpr inline LPCTSTR LITEFX_DIRECTX12_API getSemanticName(AttributeSemantic semantic);
+ LPCTSTR LITEFX_DIRECTX12_API getSemanticName(AttributeSemantic semantic);
///
///
///
///
///
- constexpr inline String LITEFX_DIRECTX12_API getVendorName(UInt32 vendorId);
+ String LITEFX_DIRECTX12_API getVendorName(UInt32 vendorId);
///
///
///
- constexpr inline D3D12_COMPARISON_FUNC LITEFX_DIRECTX12_API getCompareOp(CompareOperation compareOp);
+ D3D12_COMPARISON_FUNC LITEFX_DIRECTX12_API getCompareOp(CompareOperation compareOp);
///
///
///
- constexpr inline D3D12_STENCIL_OP LITEFX_DIRECTX12_API getStencilOp(StencilOperation stencilOp);
+ D3D12_STENCIL_OP LITEFX_DIRECTX12_API getStencilOp(StencilOperation stencilOp);
///
///
///
- constexpr inline D3D12_BLEND LITEFX_DIRECTX12_API getBlendFactor(BlendFactor blendFactor);
+ D3D12_BLEND LITEFX_DIRECTX12_API getBlendFactor(BlendFactor blendFactor);
///
///
///
- constexpr inline D3D12_BLEND_OP LITEFX_DIRECTX12_API getBlendOperation(BlendOperation blendOperation);
+ D3D12_BLEND_OP LITEFX_DIRECTX12_API getBlendOperation(BlendOperation blendOperation);
///
///
///
- constexpr inline D3D12_BARRIER_SYNC LITEFX_DIRECTX12_API getPipelineStage(PipelineStage pipelineStage);
+ D3D12_BARRIER_SYNC LITEFX_DIRECTX12_API getPipelineStage(PipelineStage pipelineStage);
///
///
///
- constexpr inline D3D12_BARRIER_ACCESS LITEFX_DIRECTX12_API getResourceAccess(ResourceAccess resourceAccess);
+ D3D12_BARRIER_ACCESS LITEFX_DIRECTX12_API getResourceAccess(ResourceAccess resourceAccess);
///
///
///
- constexpr inline D3D12_BARRIER_LAYOUT LITEFX_DIRECTX12_API getImageLayout(ImageLayout imageLayout);
+ D3D12_BARRIER_LAYOUT LITEFX_DIRECTX12_API getImageLayout(ImageLayout imageLayout);
}
///
diff --git a/src/Backends/DirectX12/include/litefx/backends/dx12_builders.hpp b/src/Backends/DirectX12/include/litefx/backends/dx12_builders.hpp
index 844368800..cc9175f00 100644
--- a/src/Backends/DirectX12/include/litefx/backends/dx12_builders.hpp
+++ b/src/Backends/DirectX12/include/litefx/backends/dx12_builders.hpp
@@ -18,24 +18,24 @@ namespace LiteFX::Rendering::Backends {
///
/// Initializes a DirectX 12 barrier builder.
///
- constexpr inline explicit DirectX12BarrierBuilder();
- constexpr inline DirectX12BarrierBuilder(const DirectX12BarrierBuilder&) = delete;
- constexpr inline DirectX12BarrierBuilder(DirectX12BarrierBuilder&&) = default;
- constexpr inline virtual ~DirectX12BarrierBuilder() noexcept;
+ explicit DirectX12BarrierBuilder();
+ DirectX12BarrierBuilder(const DirectX12BarrierBuilder&) = delete;
+ DirectX12BarrierBuilder(DirectX12BarrierBuilder&&) = default;
+ virtual ~DirectX12BarrierBuilder() noexcept;
// BarrierBuilder interface.
public:
///
- constexpr inline void setupStages(PipelineStage waitFor, PipelineStage continueWith) override;
+ void setupStages(PipelineStage waitFor, PipelineStage continueWith) override;
///
- constexpr inline void setupGlobalBarrier(ResourceAccess before, ResourceAccess after) override;
+ void setupGlobalBarrier(ResourceAccess before, ResourceAccess after) override;
///
- constexpr inline void setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after) override;
+ void setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after) override;
///
- constexpr inline void setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) override;
+ void setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) override;
};
///
@@ -50,23 +50,23 @@ namespace LiteFX::Rendering::Backends {
/// Initializes a DirectX 12 shader program builder.
///
/// The parent device that hosts the shader program.
- constexpr inline explicit DirectX12ShaderProgramBuilder(const DirectX12Device& device);
+ explicit DirectX12ShaderProgramBuilder(const DirectX12Device& device);
DirectX12ShaderProgramBuilder(const DirectX12ShaderProgramBuilder&) = delete;
DirectX12ShaderProgramBuilder(DirectX12ShaderProgramBuilder&&) = delete;
- constexpr inline virtual ~DirectX12ShaderProgramBuilder() noexcept;
+ virtual ~DirectX12ShaderProgramBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// ShaderProgramBuilder interface.
protected:
///
- constexpr inline UniquePtr makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor) override;
+ UniquePtr makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor) override;
///
- constexpr inline UniquePtr makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor) override;
+ UniquePtr makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor) override;
};
///
@@ -78,15 +78,15 @@ namespace LiteFX::Rendering::Backends {
///
/// Initializes a DirectX 12 input assembler builder.
///
- constexpr inline explicit DirectX12RasterizerBuilder() noexcept;
+ explicit DirectX12RasterizerBuilder() noexcept;
DirectX12RasterizerBuilder(const DirectX12RasterizerBuilder&) noexcept = delete;
DirectX12RasterizerBuilder(DirectX12RasterizerBuilder&&) noexcept = delete;
- constexpr inline virtual ~DirectX12RasterizerBuilder() noexcept;
+ virtual ~DirectX12RasterizerBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
};
///
@@ -101,7 +101,7 @@ namespace LiteFX::Rendering::Backends {
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
};
///
@@ -115,15 +115,15 @@ namespace LiteFX::Rendering::Backends {
///
/// Initializes a DirectX 12 input assembler builder.
///
- constexpr inline explicit DirectX12InputAssemblerBuilder() noexcept;
+ explicit DirectX12InputAssemblerBuilder() noexcept;
DirectX12InputAssemblerBuilder(const DirectX12InputAssemblerBuilder&) noexcept = delete;
DirectX12InputAssemblerBuilder(DirectX12InputAssemblerBuilder&&) noexcept = delete;
- constexpr inline virtual ~DirectX12InputAssemblerBuilder() noexcept;
+ virtual ~DirectX12InputAssemblerBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
public:
///
@@ -131,14 +131,14 @@ namespace LiteFX::Rendering::Backends {
///
/// The size of a vertex within the vertex buffer.
/// The binding point to bind the vertex buffer to.
- constexpr inline DirectX12VertexBufferLayoutBuilder vertexBuffer(size_t elementSize, UInt32 binding = 0);
+ DirectX12VertexBufferLayoutBuilder vertexBuffer(size_t elementSize, UInt32 binding = 0);
///
/// Starts building an index buffer layout.
///
/// The type of the index buffer.
template
- constexpr inline auto indexType(this TSelf&& self, IndexType type) -> TSelf&& {
+ inline auto indexType(this TSelf&& self, IndexType type) -> TSelf&& {
self.use(makeUnique(type));
return std::forward(self);
}
@@ -158,23 +158,23 @@ namespace LiteFX::Rendering::Backends {
/// The parent pipeline layout builder.
/// The space the descriptor set is bound to.
/// The shader stages, the descriptor set is accessible from.
- constexpr inline explicit DirectX12DescriptorSetLayoutBuilder(DirectX12PipelineLayoutBuilder& parent, UInt32 space = 0, ShaderStage stages = ShaderStage::Any);
+ explicit DirectX12DescriptorSetLayoutBuilder(DirectX12PipelineLayoutBuilder& parent, UInt32 space = 0, ShaderStage stages = ShaderStage::Any);
DirectX12DescriptorSetLayoutBuilder(const DirectX12DescriptorSetLayoutBuilder&) = delete;
DirectX12DescriptorSetLayoutBuilder(DirectX12DescriptorSetLayoutBuilder&&) = delete;
- constexpr inline virtual ~DirectX12DescriptorSetLayoutBuilder() noexcept;
+ virtual ~DirectX12DescriptorSetLayoutBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// DescriptorSetLayoutBuilder interface.
protected:
///
- constexpr inline UniquePtr makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors) override;
+ UniquePtr makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors) override;
///
- constexpr inline UniquePtr makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy) override;
+ UniquePtr makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy) override;
};
///
@@ -188,20 +188,20 @@ namespace LiteFX::Rendering::Backends {
///
/// The parent pipeline layout builder.
/// The size of the push constants backing memory.
- constexpr inline explicit DirectX12PushConstantsLayoutBuilder(DirectX12PipelineLayoutBuilder& parent, UInt32 size);
+ explicit DirectX12PushConstantsLayoutBuilder(DirectX12PipelineLayoutBuilder& parent, UInt32 size);
DirectX12PushConstantsLayoutBuilder(const DirectX12PushConstantsLayoutBuilder&) = delete;
DirectX12PushConstantsLayoutBuilder(DirectX12PushConstantsLayoutBuilder&&) = delete;
- constexpr inline virtual ~DirectX12PushConstantsLayoutBuilder() noexcept;
+ virtual ~DirectX12PushConstantsLayoutBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// PushConstantsLayoutBuilder interface.
protected:
///
- constexpr inline UniquePtr makeRange(ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding) override;
+ UniquePtr makeRange(ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding) override;
};
///
@@ -218,15 +218,15 @@ namespace LiteFX::Rendering::Backends {
///
/// Initializes a new DirectX 12 pipeline layout builder.
///
- constexpr inline DirectX12PipelineLayoutBuilder(const DirectX12Device& device);
+ DirectX12PipelineLayoutBuilder(const DirectX12Device& device);
DirectX12PipelineLayoutBuilder(DirectX12PipelineLayoutBuilder&&) = delete;
DirectX12PipelineLayoutBuilder(const DirectX12PipelineLayoutBuilder&) = delete;
- constexpr inline virtual ~DirectX12PipelineLayoutBuilder() noexcept;
+ virtual ~DirectX12PipelineLayoutBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// DirectX12PipelineLayoutBuilder.
public:
@@ -235,20 +235,20 @@ namespace LiteFX::Rendering::Backends {
///
/// The space, the descriptor set is bound to.
/// The stages, the descriptor set will be accessible from.
- constexpr inline DirectX12DescriptorSetLayoutBuilder descriptorSet(UInt32 space = 0, ShaderStage stages = ShaderStage::Any);
+ DirectX12DescriptorSetLayoutBuilder descriptorSet(UInt32 space = 0, ShaderStage stages = ShaderStage::Any);
///
/// Builds a new push constants layout for the pipeline layout.
///
/// The size of the push constants backing memory.
- constexpr inline DirectX12PushConstantsLayoutBuilder pushConstants(UInt32 size);
+ DirectX12PushConstantsLayoutBuilder pushConstants(UInt32 size);
private:
///
/// Returns the device, the builder has been initialized with.
///
/// A reference of the device, the builder has been initialized with.
- constexpr inline const DirectX12Device& device() const noexcept;
+ const DirectX12Device& device() const noexcept;
};
///
@@ -262,15 +262,15 @@ namespace LiteFX::Rendering::Backends {
///
/// The parent render pass.
/// A debug name for the render pipeline.
- constexpr inline explicit DirectX12RenderPipelineBuilder(const DirectX12RenderPass& renderPass, const String& name = "");
+ explicit DirectX12RenderPipelineBuilder(const DirectX12RenderPass& renderPass, const String& name = "");
DirectX12RenderPipelineBuilder(DirectX12RenderPipelineBuilder&&) = delete;
DirectX12RenderPipelineBuilder(const DirectX12RenderPipelineBuilder&) = delete;
- constexpr inline virtual ~DirectX12RenderPipelineBuilder() noexcept;
+ virtual ~DirectX12RenderPipelineBuilder() noexcept;
// Builder interface.
public:
///
- inline void build() override;
+ void build() override;
};
///
@@ -284,15 +284,15 @@ namespace LiteFX::Rendering::Backends {
///
/// The parent device
/// A debug name for the compute pipeline.
- constexpr inline explicit DirectX12ComputePipelineBuilder(const DirectX12Device& device, const String& name = "");
+ explicit DirectX12ComputePipelineBuilder(const DirectX12Device& device, const String& name = "");
DirectX12ComputePipelineBuilder(DirectX12ComputePipelineBuilder&&) = delete;
DirectX12ComputePipelineBuilder(const DirectX12ComputePipelineBuilder&) = delete;
- constexpr inline virtual ~DirectX12ComputePipelineBuilder() noexcept;
+ virtual ~DirectX12ComputePipelineBuilder() noexcept;
// Builder interface.
public:
///
- inline void build() override;
+ void build() override;
};
///
@@ -307,15 +307,15 @@ namespace LiteFX::Rendering::Backends {
/// The parent device
/// The shader record collection that is used to build the shader binding table for the pipeline.
/// A debug name for the ray-tracing pipeline.
- constexpr inline explicit DirectX12RayTracingPipelineBuilder(const DirectX12Device& device, ShaderRecordCollection&& shaderRecords, const String& name = "");
+ explicit DirectX12RayTracingPipelineBuilder(const DirectX12Device& device, ShaderRecordCollection&& shaderRecords, const String& name = "");
DirectX12RayTracingPipelineBuilder(DirectX12RayTracingPipelineBuilder&&) = delete;
DirectX12RayTracingPipelineBuilder(const DirectX12RayTracingPipelineBuilder&) = delete;
- constexpr inline virtual ~DirectX12RayTracingPipelineBuilder() noexcept;
+ virtual ~DirectX12RayTracingPipelineBuilder() noexcept;
// Builder interface.
public:
///
- inline void build() override;
+ void build() override;
};
///
@@ -329,7 +329,7 @@ namespace LiteFX::Rendering::Backends {
///
/// The parent device
/// A debug name for the render pass.
- constexpr inline explicit DirectX12RenderPassBuilder(const DirectX12Device& device, const String& name = "") noexcept;
+ explicit DirectX12RenderPassBuilder(const DirectX12Device& device, const String& name = "") noexcept;
///
/// Initializes a DirectX 12 render pass builder.
@@ -337,21 +337,21 @@ namespace LiteFX::Rendering::Backends {
/// The parent device
/// The number of command buffers to initialize.
/// A debug name for the render pass.
- constexpr inline explicit DirectX12RenderPassBuilder(const DirectX12Device& device, UInt32 commandBuffers, const String& name = "") noexcept;
+ explicit DirectX12RenderPassBuilder(const DirectX12Device& device, UInt32 commandBuffers, const String& name = "") noexcept;
DirectX12RenderPassBuilder(const DirectX12RenderPassBuilder&) noexcept = delete;
DirectX12RenderPassBuilder(DirectX12RenderPassBuilder&&) noexcept = delete;
- constexpr inline virtual ~DirectX12RenderPassBuilder() noexcept;
+ virtual ~DirectX12RenderPassBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// RenderPassBuilder interface.
protected:
///
- inline RenderPassDependency makeInputAttachment(DescriptorBindingPoint binding, const RenderTarget& renderTarget) override;
+ RenderPassDependency makeInputAttachment(DescriptorBindingPoint binding, const RenderTarget& renderTarget) override;
};
}
diff --git a/src/Backends/DirectX12/src/barrier.cpp b/src/Backends/DirectX12/src/barrier.cpp
index ace088081..aee1e7153 100644
--- a/src/Backends/DirectX12/src/barrier.cpp
+++ b/src/Backends/DirectX12/src/barrier.cpp
@@ -32,69 +32,69 @@ class DirectX12Barrier::DirectX12BarrierImpl : public Implement(this, syncBefore, syncAfter))
{
}
-constexpr DirectX12Barrier::DirectX12Barrier() noexcept :
+DirectX12Barrier::DirectX12Barrier() noexcept :
DirectX12Barrier(PipelineStage::None, PipelineStage::None)
{
}
-constexpr DirectX12Barrier::~DirectX12Barrier() noexcept = default;
+DirectX12Barrier::~DirectX12Barrier() noexcept = default;
-constexpr PipelineStage DirectX12Barrier::syncBefore() const noexcept
+PipelineStage DirectX12Barrier::syncBefore() const noexcept
{
return m_impl->m_syncBefore;
}
-constexpr PipelineStage& DirectX12Barrier::syncBefore() noexcept
+PipelineStage& DirectX12Barrier::syncBefore() noexcept
{
return m_impl->m_syncBefore;
}
-constexpr PipelineStage DirectX12Barrier::syncAfter() const noexcept
+PipelineStage DirectX12Barrier::syncAfter() const noexcept
{
return m_impl->m_syncAfter;
}
-constexpr PipelineStage& DirectX12Barrier::syncAfter() noexcept
+PipelineStage& DirectX12Barrier::syncAfter() noexcept
{
return m_impl->m_syncAfter;
}
-constexpr void DirectX12Barrier::wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept
+void DirectX12Barrier::wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept
{
m_impl->m_globalBarriers.push_back({ accessBefore, accessAfter });
}
-constexpr void DirectX12Barrier::transition(const IDirectX12Buffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter)
+void DirectX12Barrier::transition(const IDirectX12Buffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter)
{
m_impl->m_bufferBarriers.push_back({ accessBefore, accessAfter, buffer, D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES });
}
-constexpr void DirectX12Barrier::transition(const IDirectX12Buffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter)
+void DirectX12Barrier::transition(const IDirectX12Buffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter)
{
m_impl->m_bufferBarriers.push_back({ accessBefore, accessAfter, buffer, element });
}
-constexpr void DirectX12Barrier::transition(const IDirectX12Image& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout)
+void DirectX12Barrier::transition(const IDirectX12Image& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout)
{
m_impl->m_imageBarriers.push_back({ accessBefore, accessAfter, image, std::nullopt, layout, 0, image.levels(), 0, image.layers(), 0 });
}
-constexpr void DirectX12Barrier::transition(const IDirectX12Image& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout)
+void DirectX12Barrier::transition(const IDirectX12Image& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout)
{
m_impl->m_imageBarriers.push_back({ accessBefore, accessAfter, image, fromLayout, toLayout, 0, image.levels(), 0, image.layers(), 0 });
}
-constexpr void DirectX12Barrier::transition(const IDirectX12Image& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout)
+void DirectX12Barrier::transition(const IDirectX12Image& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout)
{
m_impl->m_imageBarriers.push_back({ accessBefore, accessAfter, image, std::nullopt, layout, level, levels, layer, layers, plane });
}
-constexpr void DirectX12Barrier::transition(const IDirectX12Image& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout)
+void DirectX12Barrier::transition(const IDirectX12Image& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout)
{
m_impl->m_imageBarriers.push_back({ accessBefore, accessAfter, image, fromLayout, toLayout, level, levels, layer, layers, plane });
}
@@ -158,30 +158,30 @@ void DirectX12Barrier::execute(const DirectX12CommandBuffer& commandBuffer) cons
// Builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12BarrierBuilder::DirectX12BarrierBuilder() :
+DirectX12BarrierBuilder::DirectX12BarrierBuilder() :
BarrierBuilder(std::move(UniquePtr(new DirectX12Barrier())))
{
}
-constexpr DirectX12BarrierBuilder::~DirectX12BarrierBuilder() noexcept = default;
+DirectX12BarrierBuilder::~DirectX12BarrierBuilder() noexcept = default;
-constexpr void DirectX12BarrierBuilder::setupStages(PipelineStage waitFor, PipelineStage continueWith)
+void DirectX12BarrierBuilder::setupStages(PipelineStage waitFor, PipelineStage continueWith)
{
this->instance()->syncBefore() = waitFor;
this->instance()->syncAfter() = continueWith;
}
-constexpr void DirectX12BarrierBuilder::setupGlobalBarrier(ResourceAccess before, ResourceAccess after)
+void DirectX12BarrierBuilder::setupGlobalBarrier(ResourceAccess before, ResourceAccess after)
{
this->instance()->wait(before, after);
}
-constexpr void DirectX12BarrierBuilder::setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after)
+void DirectX12BarrierBuilder::setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after)
{
this->instance()->transition(buffer, before, after);
}
-constexpr void DirectX12BarrierBuilder::setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane)
+void DirectX12BarrierBuilder::setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane)
{
auto numLevels = levels > 0 ? levels : image.levels() - level;
auto numLayers = layers > 0 ? layers : image.layers() - layer;
diff --git a/src/Backends/DirectX12/src/compute_pipeline.cpp b/src/Backends/DirectX12/src/compute_pipeline.cpp
index 9a5cbc444..63e1821d1 100644
--- a/src/Backends/DirectX12/src/compute_pipeline.cpp
+++ b/src/Backends/DirectX12/src/compute_pipeline.cpp
@@ -108,13 +108,13 @@ void DirectX12ComputePipeline::use(const DirectX12CommandBuffer& commandBuffer)
// Builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12ComputePipelineBuilder::DirectX12ComputePipelineBuilder(const DirectX12Device& device, const String& name) :
+DirectX12ComputePipelineBuilder::DirectX12ComputePipelineBuilder(const DirectX12Device& device, const String& name) :
ComputePipelineBuilder(UniquePtr(new DirectX12ComputePipeline(device)))
{
this->instance()->name() = name;
}
-constexpr DirectX12ComputePipelineBuilder::~DirectX12ComputePipelineBuilder() noexcept = default;
+DirectX12ComputePipelineBuilder::~DirectX12ComputePipelineBuilder() noexcept = default;
void DirectX12ComputePipelineBuilder::build()
{
diff --git a/src/Backends/DirectX12/src/convert.cpp b/src/Backends/DirectX12/src/convert.cpp
index a3314d2d0..fb46e2e7d 100644
--- a/src/Backends/DirectX12/src/convert.cpp
+++ b/src/Backends/DirectX12/src/convert.cpp
@@ -2,7 +2,7 @@
using namespace LiteFX::Rendering::Backends;
-constexpr Format LiteFX::Rendering::Backends::DX12::getFormat(const DXGI_FORMAT& format)
+Format LiteFX::Rendering::Backends::DX12::getFormat(const DXGI_FORMAT& format)
{
switch (format)
{
@@ -149,7 +149,7 @@ constexpr Format LiteFX::Rendering::Backends::DX12::getFormat(const DXGI_FORMAT&
}
}
-constexpr DXGI_FORMAT LiteFX::Rendering::Backends::DX12::getFormat(Format format)
+DXGI_FORMAT LiteFX::Rendering::Backends::DX12::getFormat(Format format)
{
switch (format)
{
@@ -294,7 +294,7 @@ constexpr DXGI_FORMAT LiteFX::Rendering::Backends::DX12::getFormat(Format format
}
}
-constexpr DXGI_FORMAT LiteFX::Rendering::Backends::DX12::getFormat(BufferFormat format)
+DXGI_FORMAT LiteFX::Rendering::Backends::DX12::getFormat(BufferFormat format)
{
switch (format)
{
@@ -345,7 +345,7 @@ constexpr DXGI_FORMAT LiteFX::Rendering::Backends::DX12::getFormat(BufferFormat
}
}
-constexpr bool LiteFX::Rendering::Backends::DX12::isSRGB(Format format)
+bool LiteFX::Rendering::Backends::DX12::isSRGB(Format format)
{
return
format == Format::A8B8G8R8_SRGB ||
@@ -362,7 +362,7 @@ constexpr bool LiteFX::Rendering::Backends::DX12::isSRGB(Format format)
format == Format::R8_SRGB;
}
-constexpr D3D12_RESOURCE_DIMENSION LiteFX::Rendering::Backends::DX12::getImageType(ImageDimensions dimensions)
+D3D12_RESOURCE_DIMENSION LiteFX::Rendering::Backends::DX12::getImageType(ImageDimensions dimensions)
{
switch (dimensions)
{
@@ -378,7 +378,7 @@ constexpr D3D12_RESOURCE_DIMENSION LiteFX::Rendering::Backends::DX12::getImageTy
}
}
-constexpr PolygonMode LiteFX::Rendering::Backends::DX12::getPolygonMode(const D3D12_FILL_MODE& mode)
+PolygonMode LiteFX::Rendering::Backends::DX12::getPolygonMode(const D3D12_FILL_MODE& mode)
{
switch (mode)
{
@@ -391,7 +391,7 @@ constexpr PolygonMode LiteFX::Rendering::Backends::DX12::getPolygonMode(const D3
}
}
-constexpr D3D12_FILL_MODE LiteFX::Rendering::Backends::DX12::getPolygonMode(PolygonMode mode)
+D3D12_FILL_MODE LiteFX::Rendering::Backends::DX12::getPolygonMode(PolygonMode mode)
{
switch (mode)
{
@@ -404,7 +404,7 @@ constexpr D3D12_FILL_MODE LiteFX::Rendering::Backends::DX12::getPolygonMode(Poly
}
}
-constexpr CullMode LiteFX::Rendering::Backends::DX12::getCullMode(const D3D12_CULL_MODE& mode)
+CullMode LiteFX::Rendering::Backends::DX12::getCullMode(const D3D12_CULL_MODE& mode)
{
switch (mode)
{
@@ -419,7 +419,7 @@ constexpr CullMode LiteFX::Rendering::Backends::DX12::getCullMode(const D3D12_CU
}
}
-constexpr D3D12_CULL_MODE LiteFX::Rendering::Backends::DX12::getCullMode(CullMode mode)
+D3D12_CULL_MODE LiteFX::Rendering::Backends::DX12::getCullMode(CullMode mode)
{
switch (mode)
{
@@ -434,7 +434,7 @@ constexpr D3D12_CULL_MODE LiteFX::Rendering::Backends::DX12::getCullMode(CullMod
}
}
-constexpr PrimitiveTopology LiteFX::Rendering::Backends::DX12::getPrimitiveTopology(const D3D12_PRIMITIVE_TOPOLOGY& topology)
+PrimitiveTopology LiteFX::Rendering::Backends::DX12::getPrimitiveTopology(const D3D12_PRIMITIVE_TOPOLOGY& topology)
{
switch (topology)
{
@@ -453,7 +453,7 @@ constexpr PrimitiveTopology LiteFX::Rendering::Backends::DX12::getPrimitiveTopol
}
}
-constexpr D3D12_PRIMITIVE_TOPOLOGY LiteFX::Rendering::Backends::DX12::getPrimitiveTopology(PrimitiveTopology topology)
+D3D12_PRIMITIVE_TOPOLOGY LiteFX::Rendering::Backends::DX12::getPrimitiveTopology(PrimitiveTopology topology)
{
switch (topology)
{
@@ -472,7 +472,7 @@ constexpr D3D12_PRIMITIVE_TOPOLOGY LiteFX::Rendering::Backends::DX12::getPrimiti
}
}
-constexpr D3D12_PRIMITIVE_TOPOLOGY_TYPE LiteFX::Rendering::Backends::DX12::getPrimitiveTopologyType(PrimitiveTopology topology)
+D3D12_PRIMITIVE_TOPOLOGY_TYPE LiteFX::Rendering::Backends::DX12::getPrimitiveTopologyType(PrimitiveTopology topology)
{
switch (topology)
{
@@ -489,7 +489,7 @@ constexpr D3D12_PRIMITIVE_TOPOLOGY_TYPE LiteFX::Rendering::Backends::DX12::getPr
}
}
-constexpr LPCTSTR LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getSemanticName(AttributeSemantic semantic)
+LPCTSTR LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getSemanticName(AttributeSemantic semantic)
{
switch (semantic)
{
@@ -518,7 +518,7 @@ constexpr LPCTSTR LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getSem
}
}
-constexpr String LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getVendorName(UInt32 vendorId)
+String LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getVendorName(UInt32 vendorId)
{
switch (vendorId)
{
@@ -538,7 +538,7 @@ constexpr String LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getVend
}
}
-constexpr D3D12_COMPARISON_FUNC LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getCompareOp(CompareOperation compareOp)
+D3D12_COMPARISON_FUNC LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getCompareOp(CompareOperation compareOp)
{
switch (compareOp) {
case CompareOperation::Never: return D3D12_COMPARISON_FUNC::D3D12_COMPARISON_FUNC_NEVER;
@@ -553,7 +553,7 @@ constexpr D3D12_COMPARISON_FUNC LITEFX_DIRECTX12_API LiteFX::Rendering::Backends
}
}
-constexpr D3D12_STENCIL_OP LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getStencilOp(StencilOperation stencilOp)
+D3D12_STENCIL_OP LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getStencilOp(StencilOperation stencilOp)
{
switch (stencilOp) {
case StencilOperation::Keep: return D3D12_STENCIL_OP::D3D12_STENCIL_OP_KEEP;
@@ -568,7 +568,7 @@ constexpr D3D12_STENCIL_OP LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX1
}
}
-constexpr D3D12_BLEND LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getBlendFactor(BlendFactor blendFactor)
+D3D12_BLEND LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getBlendFactor(BlendFactor blendFactor)
{
switch (blendFactor) {
case BlendFactor::Zero: return D3D12_BLEND_ZERO;
@@ -594,7 +594,7 @@ constexpr D3D12_BLEND LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::ge
}
}
-constexpr D3D12_BLEND_OP LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getBlendOperation(BlendOperation blendOperation)
+D3D12_BLEND_OP LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getBlendOperation(BlendOperation blendOperation)
{
switch (blendOperation) {
case BlendOperation::Add: return D3D12_BLEND_OP_ADD;
@@ -606,7 +606,7 @@ constexpr D3D12_BLEND_OP LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12:
}
}
-constexpr D3D12_BARRIER_SYNC LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getPipelineStage(PipelineStage pipelineStage)
+D3D12_BARRIER_SYNC LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getPipelineStage(PipelineStage pipelineStage)
{
if (pipelineStage == PipelineStage::None)
return D3D12_BARRIER_SYNC_NONE;
@@ -658,7 +658,7 @@ constexpr D3D12_BARRIER_SYNC LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::D
return sync;
}
-constexpr D3D12_BARRIER_ACCESS LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getResourceAccess(ResourceAccess resourceAccess)
+D3D12_BARRIER_ACCESS LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getResourceAccess(ResourceAccess resourceAccess)
{
if (resourceAccess == ResourceAccess::None)
return D3D12_BARRIER_ACCESS_NO_ACCESS;
@@ -716,7 +716,7 @@ constexpr D3D12_BARRIER_ACCESS LITEFX_DIRECTX12_API LiteFX::Rendering::Backends:
return access;
}
-constexpr D3D12_BARRIER_LAYOUT LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getImageLayout(ImageLayout imageLayout)
+D3D12_BARRIER_LAYOUT LITEFX_DIRECTX12_API LiteFX::Rendering::Backends::DX12::getImageLayout(ImageLayout imageLayout)
{
switch (imageLayout) {
case ImageLayout::Common: return D3D12_BARRIER_LAYOUT_COMMON;
diff --git a/src/Backends/DirectX12/src/descriptor_set_layout.cpp b/src/Backends/DirectX12/src/descriptor_set_layout.cpp
index c613e7c55..ec8863343 100644
--- a/src/Backends/DirectX12/src/descriptor_set_layout.cpp
+++ b/src/Backends/DirectX12/src/descriptor_set_layout.cpp
@@ -303,11 +303,11 @@ void DirectX12DescriptorSetLayout::free(const DirectX12DescriptorSet& descriptor
// Descriptor set layout builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12DescriptorSetLayoutBuilder::DirectX12DescriptorSetLayoutBuilder(DirectX12PipelineLayoutBuilder& parent, UInt32 space, ShaderStage stages) :
+DirectX12DescriptorSetLayoutBuilder::DirectX12DescriptorSetLayoutBuilder(DirectX12PipelineLayoutBuilder& parent, UInt32 space, ShaderStage stages) :
DescriptorSetLayoutBuilder(parent, UniquePtr(new DirectX12DescriptorSetLayout(parent.device())))
{
}
-constexpr DirectX12DescriptorSetLayoutBuilder::~DirectX12DescriptorSetLayoutBuilder() noexcept = default;
+DirectX12DescriptorSetLayoutBuilder::~DirectX12DescriptorSetLayoutBuilder() noexcept = default;
void DirectX12DescriptorSetLayoutBuilder::build()
{
@@ -318,12 +318,12 @@ void DirectX12DescriptorSetLayoutBuilder::build()
instance->m_impl->initialize();
}
-constexpr UniquePtr DirectX12DescriptorSetLayoutBuilder::makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors)
+UniquePtr DirectX12DescriptorSetLayoutBuilder::makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors)
{
return makeUnique(type, binding, descriptorSize, descriptors);
}
-constexpr UniquePtr DirectX12DescriptorSetLayoutBuilder::makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy)
+UniquePtr DirectX12DescriptorSetLayoutBuilder::makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy)
{
return makeUnique(makeUnique(this->parent().device(), magFilter, minFilter, borderU, borderV, borderW, mipMapMode, mipMapBias, minLod, maxLod, anisotropy), binding);
}
diff --git a/src/Backends/DirectX12/src/input_assembler.cpp b/src/Backends/DirectX12/src/input_assembler.cpp
index 10c377096..ec834e7c1 100644
--- a/src/Backends/DirectX12/src/input_assembler.cpp
+++ b/src/Backends/DirectX12/src/input_assembler.cpp
@@ -106,19 +106,19 @@ class DirectX12InputAssemblerBuilder::DirectX12InputAssemblerBuilderImpl : publi
// Builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12InputAssemblerBuilder::DirectX12InputAssemblerBuilder() noexcept :
+DirectX12InputAssemblerBuilder::DirectX12InputAssemblerBuilder() noexcept :
m_impl(makePimpl(this)), InputAssemblerBuilder(SharedPtr(new DirectX12InputAssembler()))
{
}
-constexpr DirectX12InputAssemblerBuilder::~DirectX12InputAssemblerBuilder() noexcept = default;
+DirectX12InputAssemblerBuilder::~DirectX12InputAssemblerBuilder() noexcept = default;
void DirectX12InputAssemblerBuilder::build()
{
this->instance()->m_impl->initialize(m_state.vertexBufferLayouts | std::views::as_rvalue, std::move(m_state.indexBufferLayout), m_state.topology);
}
-constexpr DirectX12VertexBufferLayoutBuilder DirectX12InputAssemblerBuilder::vertexBuffer(size_t elementSize, UInt32 binding)
+DirectX12VertexBufferLayoutBuilder DirectX12InputAssemblerBuilder::vertexBuffer(size_t elementSize, UInt32 binding)
{
return DirectX12VertexBufferLayoutBuilder(*this, makeUnique(elementSize, binding));
}
diff --git a/src/Backends/DirectX12/src/pipeline_layout.cpp b/src/Backends/DirectX12/src/pipeline_layout.cpp
index f88fe0519..0b98f8e88 100644
--- a/src/Backends/DirectX12/src/pipeline_layout.cpp
+++ b/src/Backends/DirectX12/src/pipeline_layout.cpp
@@ -281,12 +281,12 @@ class DirectX12PipelineLayoutBuilder::DirectX12PipelineLayoutBuilderImpl : publi
// Pipeline layout builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12PipelineLayoutBuilder::DirectX12PipelineLayoutBuilder(const DirectX12Device& parent) :
+DirectX12PipelineLayoutBuilder::DirectX12PipelineLayoutBuilder(const DirectX12Device& parent) :
m_impl(makePimpl(this, parent)), PipelineLayoutBuilder(SharedPtr(new DirectX12PipelineLayout(parent)))
{
}
-constexpr DirectX12PipelineLayoutBuilder::~DirectX12PipelineLayoutBuilder() noexcept = default;
+DirectX12PipelineLayoutBuilder::~DirectX12PipelineLayoutBuilder() noexcept = default;
void DirectX12PipelineLayoutBuilder::build()
{
@@ -296,17 +296,17 @@ void DirectX12PipelineLayoutBuilder::build()
instance->handle() = instance->m_impl->initialize();
}
-constexpr DirectX12DescriptorSetLayoutBuilder DirectX12PipelineLayoutBuilder::descriptorSet(UInt32 space, ShaderStage stages)
+DirectX12DescriptorSetLayoutBuilder DirectX12PipelineLayoutBuilder::descriptorSet(UInt32 space, ShaderStage stages)
{
return DirectX12DescriptorSetLayoutBuilder(*this, space, stages);
}
-constexpr DirectX12PushConstantsLayoutBuilder DirectX12PipelineLayoutBuilder::pushConstants(UInt32 size)
+DirectX12PushConstantsLayoutBuilder DirectX12PipelineLayoutBuilder::pushConstants(UInt32 size)
{
return DirectX12PushConstantsLayoutBuilder(*this, size);
}
-constexpr const DirectX12Device& DirectX12PipelineLayoutBuilder::device() const noexcept
+const DirectX12Device& DirectX12PipelineLayoutBuilder::device() const noexcept
{
return m_impl->m_device;
}
diff --git a/src/Backends/DirectX12/src/push_constants_layout.cpp b/src/Backends/DirectX12/src/push_constants_layout.cpp
index 6d84a1751..8cbc06da1 100644
--- a/src/Backends/DirectX12/src/push_constants_layout.cpp
+++ b/src/Backends/DirectX12/src/push_constants_layout.cpp
@@ -93,19 +93,19 @@ Enumerable DirectX12PushConstantsLayout::ranges()
// Push constants layout builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12PushConstantsLayoutBuilder::DirectX12PushConstantsLayoutBuilder(DirectX12PipelineLayoutBuilder& parent, UInt32 size) :
+DirectX12PushConstantsLayoutBuilder::DirectX12PushConstantsLayoutBuilder(DirectX12PipelineLayoutBuilder& parent, UInt32 size) :
PushConstantsLayoutBuilder(parent, UniquePtr(new DirectX12PushConstantsLayout(size)))
{
}
-constexpr DirectX12PushConstantsLayoutBuilder::~DirectX12PushConstantsLayoutBuilder() noexcept = default;
+DirectX12PushConstantsLayoutBuilder::~DirectX12PushConstantsLayoutBuilder() noexcept = default;
void DirectX12PushConstantsLayoutBuilder::build()
{
this->instance()->m_impl->setRanges(std::move(m_state.ranges | std::views::as_rvalue | std::ranges::to>>()));
}
-constexpr UniquePtr DirectX12PushConstantsLayoutBuilder::makeRange(ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding)
+UniquePtr DirectX12PushConstantsLayoutBuilder::makeRange(ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding)
{
return makeUnique(shaderStages, offset, size, space, binding);
}
diff --git a/src/Backends/DirectX12/src/rasterizer.cpp b/src/Backends/DirectX12/src/rasterizer.cpp
index 5ce42a5f5..b9f99fe6d 100644
--- a/src/Backends/DirectX12/src/rasterizer.cpp
+++ b/src/Backends/DirectX12/src/rasterizer.cpp
@@ -24,12 +24,12 @@ DirectX12Rasterizer::~DirectX12Rasterizer() noexcept = default;
// Builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12RasterizerBuilder::DirectX12RasterizerBuilder() noexcept :
+DirectX12RasterizerBuilder::DirectX12RasterizerBuilder() noexcept :
RasterizerBuilder(SharedPtr(new DirectX12Rasterizer()))
{
}
-constexpr DirectX12RasterizerBuilder::~DirectX12RasterizerBuilder() noexcept = default;
+DirectX12RasterizerBuilder::~DirectX12RasterizerBuilder() noexcept = default;
void DirectX12RasterizerBuilder::build()
{
diff --git a/src/Backends/DirectX12/src/ray_tracing_pipeline.cpp b/src/Backends/DirectX12/src/ray_tracing_pipeline.cpp
index 0aaec62ed..5f0314fc6 100644
--- a/src/Backends/DirectX12/src/ray_tracing_pipeline.cpp
+++ b/src/Backends/DirectX12/src/ray_tracing_pipeline.cpp
@@ -567,13 +567,13 @@ void DirectX12RayTracingPipeline::use(const DirectX12CommandBuffer& commandBuffe
// Builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12RayTracingPipelineBuilder::DirectX12RayTracingPipelineBuilder(const DirectX12Device& device, ShaderRecordCollection&& shaderRecords, const String& name) :
+DirectX12RayTracingPipelineBuilder::DirectX12RayTracingPipelineBuilder(const DirectX12Device& device, ShaderRecordCollection&& shaderRecords, const String& name) :
RayTracingPipelineBuilder(UniquePtr(new DirectX12RayTracingPipeline(device, std::move(shaderRecords))))
{
this->instance()->name() = name;
}
-constexpr DirectX12RayTracingPipelineBuilder::~DirectX12RayTracingPipelineBuilder() noexcept = default;
+DirectX12RayTracingPipelineBuilder::~DirectX12RayTracingPipelineBuilder() noexcept = default;
void DirectX12RayTracingPipelineBuilder::build()
{
diff --git a/src/Backends/DirectX12/src/render_pass.cpp b/src/Backends/DirectX12/src/render_pass.cpp
index 7022508fb..3b5d45668 100644
--- a/src/Backends/DirectX12/src/render_pass.cpp
+++ b/src/Backends/DirectX12/src/render_pass.cpp
@@ -500,18 +500,18 @@ UInt64 DirectX12RenderPass::end() const
// Builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12RenderPassBuilder::DirectX12RenderPassBuilder(const DirectX12Device& device, const String& name) noexcept :
+DirectX12RenderPassBuilder::DirectX12RenderPassBuilder(const DirectX12Device& device, const String& name) noexcept :
DirectX12RenderPassBuilder(device, 1, name)
{
}
-constexpr DirectX12RenderPassBuilder::DirectX12RenderPassBuilder(const DirectX12Device& device, UInt32 commandBuffers, const String& name) noexcept :
+DirectX12RenderPassBuilder::DirectX12RenderPassBuilder(const DirectX12Device& device, UInt32 commandBuffers, const String& name) noexcept :
RenderPassBuilder(UniquePtr(new DirectX12RenderPass(device, name)))
{
m_state.commandBufferCount = commandBuffers;
}
-constexpr DirectX12RenderPassBuilder::~DirectX12RenderPassBuilder() noexcept = default;
+DirectX12RenderPassBuilder::~DirectX12RenderPassBuilder() noexcept = default;
void DirectX12RenderPassBuilder::build()
{
diff --git a/src/Backends/DirectX12/src/render_pipeline.cpp b/src/Backends/DirectX12/src/render_pipeline.cpp
index c34aeb0f6..da111c7b4 100644
--- a/src/Backends/DirectX12/src/render_pipeline.cpp
+++ b/src/Backends/DirectX12/src/render_pipeline.cpp
@@ -544,13 +544,13 @@ void DirectX12RenderPipeline::use(const DirectX12CommandBuffer& commandBuffer) c
// Builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12RenderPipelineBuilder::DirectX12RenderPipelineBuilder(const DirectX12RenderPass& renderPass, const String& name) :
+DirectX12RenderPipelineBuilder::DirectX12RenderPipelineBuilder(const DirectX12RenderPass& renderPass, const String& name) :
RenderPipelineBuilder(UniquePtr(new DirectX12RenderPipeline(renderPass)))
{
this->instance()->name() = name;
}
-constexpr DirectX12RenderPipelineBuilder::~DirectX12RenderPipelineBuilder() noexcept = default;
+DirectX12RenderPipelineBuilder::~DirectX12RenderPipelineBuilder() noexcept = default;
void DirectX12RenderPipelineBuilder::build()
{
diff --git a/src/Backends/DirectX12/src/shader_program.cpp b/src/Backends/DirectX12/src/shader_program.cpp
index 7c94d19b2..637b7ee9c 100644
--- a/src/Backends/DirectX12/src/shader_program.cpp
+++ b/src/Backends/DirectX12/src/shader_program.cpp
@@ -562,12 +562,12 @@ class DirectX12ShaderProgramBuilder::DirectX12ShaderProgramBuilderImpl : public
// Shader program builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr DirectX12ShaderProgramBuilder::DirectX12ShaderProgramBuilder(const DirectX12Device& device) :
+DirectX12ShaderProgramBuilder::DirectX12ShaderProgramBuilder(const DirectX12Device& device) :
m_impl(makePimpl(this, device)), ShaderProgramBuilder(SharedPtr(new DirectX12ShaderProgram(device)))
{
}
-constexpr DirectX12ShaderProgramBuilder::~DirectX12ShaderProgramBuilder() noexcept = default;
+DirectX12ShaderProgramBuilder::~DirectX12ShaderProgramBuilder() noexcept = default;
void DirectX12ShaderProgramBuilder::build()
{
@@ -575,12 +575,12 @@ void DirectX12ShaderProgramBuilder::build()
this->instance()->m_impl->validate();
}
-constexpr UniquePtr DirectX12ShaderProgramBuilder::makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor)
+UniquePtr DirectX12ShaderProgramBuilder::makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor)
{
return makeUnique(m_impl->m_device, type, fileName, entryPoint, shaderLocalDescriptor);
}
-constexpr UniquePtr DirectX12ShaderProgramBuilder::makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor)
+UniquePtr DirectX12ShaderProgramBuilder::makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor)
{
return makeUnique(m_impl->m_device, type, stream, name, entryPoint, shaderLocalDescriptor);
}
diff --git a/src/Backends/Vulkan/CMakeLists.txt b/src/Backends/Vulkan/CMakeLists.txt
index 42aab188a..7e33bc1d1 100644
--- a/src/Backends/Vulkan/CMakeLists.txt
+++ b/src/Backends/Vulkan/CMakeLists.txt
@@ -57,7 +57,7 @@ SET(VULKAN_BACKEND_SOURCES
)
# Add shared library project.
-ADD_LIBRARY(${PROJECT_NAME} SHARED
+ADD_LIBRARY(${PROJECT_NAME}
${VULKAN_BACKEND_HEADERS}
${VULKAN_BACKEND_SOURCES}
)
@@ -90,6 +90,11 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME}
PRIVATE GPUOpen::VulkanMemoryAllocator unofficial::spirv-reflect
)
+# Pre-define export specifier, to prevent dllimport/dllexport from being be emitted.
+IF(NOT BUILD_SHARED_LIBS)
+ TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PUBLIC -DLITEFX_VULKAN_API=)
+ENDIF(NOT BUILD_SHARED_LIBS)
+
# Link against D3D12 to enable flip-model swap chains.
IF(LITEFX_BUILD_DIRECTX_12_BACKEND)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC LiteFX.Backends.DirectX12)
diff --git a/src/Backends/Vulkan/include/litefx/backends/vulkan.hpp b/src/Backends/Vulkan/include/litefx/backends/vulkan.hpp
index d5a3f84ef..abdd1d41d 100644
--- a/src/Backends/Vulkan/include/litefx/backends/vulkan.hpp
+++ b/src/Backends/Vulkan/include/litefx/backends/vulkan.hpp
@@ -342,44 +342,44 @@ namespace LiteFX::Rendering::Backends {
///
/// The pipeline stage(s) all previous commands have to finish before the barrier is executed.
/// The pipeline stage(s) all subsequent commands are blocked at until the barrier is executed.
- constexpr inline explicit VulkanBarrier(PipelineStage syncBefore, PipelineStage syncAfter) noexcept;
+ explicit VulkanBarrier(PipelineStage syncBefore, PipelineStage syncAfter) noexcept;
VulkanBarrier(const VulkanBarrier&) = delete;
VulkanBarrier(VulkanBarrier&&) = delete;
- constexpr inline virtual ~VulkanBarrier() noexcept;
+ virtual ~VulkanBarrier() noexcept;
private:
- constexpr inline explicit VulkanBarrier() noexcept;
- constexpr inline PipelineStage& syncBefore() noexcept;
- constexpr inline PipelineStage& syncAfter() noexcept;
+ explicit VulkanBarrier() noexcept;
+ PipelineStage& syncBefore() noexcept;
+ PipelineStage& syncAfter() noexcept;
// Barrier interface.
public:
///
- constexpr inline PipelineStage syncBefore() const noexcept override;
+ PipelineStage syncBefore() const noexcept override;
///
- constexpr inline PipelineStage syncAfter() const noexcept override;
+ PipelineStage syncAfter() const noexcept override;
///
- constexpr inline void wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept override;
+ void wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept override;
///
- constexpr inline void transition(const IVulkanBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) override;
+ void transition(const IVulkanBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) override;
///
- constexpr inline void transition(const IVulkanBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) override;
+ void transition(const IVulkanBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) override;
///
- constexpr inline void transition(const IVulkanImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override;
+ void transition(const IVulkanImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override;
///
- constexpr inline void transition(const IVulkanImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override;
+ void transition(const IVulkanImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override;
///
- constexpr inline void transition(const IVulkanImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override;
+ void transition(const IVulkanImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override;
///
- constexpr inline void transition(const IVulkanImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override;
+ void transition(const IVulkanImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override;
public:
///
@@ -387,7 +387,7 @@ namespace LiteFX::Rendering::Backends {
///
/// The command buffer to add the barriers to.
/// Thrown, if any of the contained barriers is a image barrier that targets a sub-resource range that does not share the same in all sub-resources.
- inline void execute(const VulkanCommandBuffer& commandBuffer) const noexcept;
+ void execute(const VulkanCommandBuffer& commandBuffer) const noexcept;
};
///
diff --git a/src/Backends/Vulkan/include/litefx/backends/vulkan_api.hpp b/src/Backends/Vulkan/include/litefx/backends/vulkan_api.hpp
index 889b54329..9cbbaf03e 100644
--- a/src/Backends/Vulkan/include/litefx/backends/vulkan_api.hpp
+++ b/src/Backends/Vulkan/include/litefx/backends/vulkan_api.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include
+
#if !defined (LITEFX_VULKAN_API)
# if defined(LiteFX_Backends_Vulkan_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_VULKAN_API __declspec(dllexport)
@@ -8,7 +10,7 @@
# elif !defined(LiteFX_Backends_Vulkan_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_VULKAN_API __declspec(dllimport)
# endif
-#endif
+#endif
#ifndef LITEFX_VULKAN_API
# define LITEFX_VULKAN_API
@@ -91,117 +93,117 @@ namespace LiteFX::Rendering::Backends {
///
///
///
- constexpr inline Format LITEFX_VULKAN_API getFormat(const VkFormat& format);
+ Format LITEFX_VULKAN_API getFormat(const VkFormat& format);
///
///
///
- constexpr inline VkFormat LITEFX_VULKAN_API getFormat(Format format);
+ VkFormat LITEFX_VULKAN_API getFormat(Format format);
///
///
///
- //constexpr inline BufferFormat LITEFX_VULKAN_API getFormat(const VkFormat& format);
+ //BufferFormat LITEFX_VULKAN_API getFormat(const VkFormat& format);
///
///
///
- constexpr inline VkFormat LITEFX_VULKAN_API getFormat(BufferFormat format);
+ VkFormat LITEFX_VULKAN_API getFormat(BufferFormat format);
///
///
///
- constexpr inline PolygonMode LITEFX_VULKAN_API getPolygonMode(const VkPolygonMode& mode);
+ PolygonMode LITEFX_VULKAN_API getPolygonMode(const VkPolygonMode& mode);
///
///
///
- constexpr inline VkPolygonMode LITEFX_VULKAN_API getPolygonMode(PolygonMode mode);
+ VkPolygonMode LITEFX_VULKAN_API getPolygonMode(PolygonMode mode);
///
///
///
- constexpr inline CullMode LITEFX_VULKAN_API getCullMode(const VkCullModeFlags& mode);
+ CullMode LITEFX_VULKAN_API getCullMode(const VkCullModeFlags& mode);
///
///
///
- constexpr inline VkCullModeFlags LITEFX_VULKAN_API getCullMode(CullMode mode);
+ VkCullModeFlags LITEFX_VULKAN_API getCullMode(CullMode mode);
///
///
///
- constexpr inline PrimitiveTopology LITEFX_VULKAN_API getPrimitiveTopology(const VkPrimitiveTopology& topology);
+ PrimitiveTopology LITEFX_VULKAN_API getPrimitiveTopology(const VkPrimitiveTopology& topology);
///
///
///
- constexpr inline VkPrimitiveTopology LITEFX_VULKAN_API getPrimitiveTopology(PrimitiveTopology topology);
+ VkPrimitiveTopology LITEFX_VULKAN_API getPrimitiveTopology(PrimitiveTopology topology);
///
///
///
- constexpr inline ShaderStage LITEFX_VULKAN_API getShaderStage(const VkShaderStageFlagBits& shaderType);
+ ShaderStage LITEFX_VULKAN_API getShaderStage(const VkShaderStageFlagBits& shaderType);
///
///
///
- constexpr inline VkShaderStageFlagBits LITEFX_VULKAN_API getShaderStage(ShaderStage shaderType);
+ VkShaderStageFlagBits LITEFX_VULKAN_API getShaderStage(ShaderStage shaderType);
///
///
///
- constexpr inline MultiSamplingLevel LITEFX_VULKAN_API getSamples(const VkSampleCountFlagBits& samples);
+ MultiSamplingLevel LITEFX_VULKAN_API getSamples(const VkSampleCountFlagBits& samples);
///
///
///
- constexpr inline VkImageType LITEFX_VULKAN_API getImageType(ImageDimensions dimension);
+ VkImageType LITEFX_VULKAN_API getImageType(ImageDimensions dimension);
///
///
///
- constexpr inline VkImageViewType LITEFX_VULKAN_API getImageViewType(ImageDimensions dimension, UInt32 layers = 1);
+ VkImageViewType LITEFX_VULKAN_API getImageViewType(ImageDimensions dimension, UInt32 layers = 1);
///
///
///
- constexpr inline VkSampleCountFlagBits LITEFX_VULKAN_API getSamples(MultiSamplingLevel samples);
+ VkSampleCountFlagBits LITEFX_VULKAN_API getSamples(MultiSamplingLevel samples);
///
///
///
- constexpr inline VkCompareOp LITEFX_VULKAN_API getCompareOp(CompareOperation compareOp);
+ VkCompareOp LITEFX_VULKAN_API getCompareOp(CompareOperation compareOp);
///
///
///
- constexpr inline VkStencilOp LITEFX_VULKAN_API getStencilOp(StencilOperation stencilOp);
+ VkStencilOp LITEFX_VULKAN_API getStencilOp(StencilOperation stencilOp);
///
///
///
- constexpr inline VkBlendFactor LITEFX_VULKAN_API getBlendFactor(BlendFactor blendFactor);
+ VkBlendFactor LITEFX_VULKAN_API getBlendFactor(BlendFactor blendFactor);
///
///
///
- constexpr inline VkBlendOp LITEFX_VULKAN_API getBlendOperation(BlendOperation blendOperation);
+ VkBlendOp LITEFX_VULKAN_API getBlendOperation(BlendOperation blendOperation);
///
///
///
- constexpr inline VkPipelineStageFlags2 LITEFX_VULKAN_API getPipelineStage(PipelineStage pipelineStage);
+ VkPipelineStageFlags2 LITEFX_VULKAN_API getPipelineStage(PipelineStage pipelineStage);
///
///
///
- constexpr inline VkAccessFlags2 LITEFX_VULKAN_API getResourceAccess(ResourceAccess resourceAccess);
+ VkAccessFlags2 LITEFX_VULKAN_API getResourceAccess(ResourceAccess resourceAccess);
///
///
///
- constexpr inline VkImageLayout LITEFX_VULKAN_API getImageLayout(ImageLayout imageLayout);
+ VkImageLayout LITEFX_VULKAN_API getImageLayout(ImageLayout imageLayout);
}
///
diff --git a/src/Backends/Vulkan/include/litefx/backends/vulkan_builders.hpp b/src/Backends/Vulkan/include/litefx/backends/vulkan_builders.hpp
index d5a52efca..9f68a6e72 100644
--- a/src/Backends/Vulkan/include/litefx/backends/vulkan_builders.hpp
+++ b/src/Backends/Vulkan/include/litefx/backends/vulkan_builders.hpp
@@ -18,24 +18,24 @@ namespace LiteFX::Rendering::Backends {
///
/// Initializes a Vulkan barrier builder.
///
- constexpr inline explicit VulkanBarrierBuilder();
- constexpr inline VulkanBarrierBuilder(const VulkanBarrierBuilder&) = delete;
- constexpr inline VulkanBarrierBuilder(VulkanBarrierBuilder&&) = default;
- constexpr inline virtual ~VulkanBarrierBuilder() noexcept;
+ explicit VulkanBarrierBuilder();
+ VulkanBarrierBuilder(const VulkanBarrierBuilder&) = delete;
+ VulkanBarrierBuilder(VulkanBarrierBuilder&&) = default;
+ virtual ~VulkanBarrierBuilder() noexcept;
// BarrierBuilder interface.
public:
///
- constexpr inline void setupStages(PipelineStage waitFor, PipelineStage continueWith) override;
+ void setupStages(PipelineStage waitFor, PipelineStage continueWith) override;
///
- constexpr inline void setupGlobalBarrier(ResourceAccess before, ResourceAccess after) override;
+ void setupGlobalBarrier(ResourceAccess before, ResourceAccess after) override;
///
- constexpr inline void setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after) override;
+ void setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after) override;
///
- constexpr inline void setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) override;
+ void setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) override;
};
///
@@ -50,23 +50,23 @@ namespace LiteFX::Rendering::Backends {
/// Initializes a Vulkan graphics shader program builder.
///
/// The parent device that hosts the shader program.
- constexpr inline explicit VulkanShaderProgramBuilder(const VulkanDevice& device);
+ explicit VulkanShaderProgramBuilder(const VulkanDevice& device);
VulkanShaderProgramBuilder(const VulkanShaderProgramBuilder&) = delete;
VulkanShaderProgramBuilder(VulkanShaderProgramBuilder&&) = delete;
- constexpr inline virtual ~VulkanShaderProgramBuilder() noexcept;
+ virtual ~VulkanShaderProgramBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// ShaderProgramBuilder interface.
protected:
///
- constexpr inline UniquePtr makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor) override;
+ UniquePtr makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor) override;
///
- constexpr inline UniquePtr makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor) override;
+ UniquePtr makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor) override;
};
///
@@ -78,15 +78,15 @@ namespace LiteFX::Rendering::Backends {
///
/// Initializes a Vulkan input assembler builder.
///
- constexpr inline explicit VulkanRasterizerBuilder() noexcept;
+ explicit VulkanRasterizerBuilder() noexcept;
VulkanRasterizerBuilder(const VulkanRasterizerBuilder&) noexcept = delete;
VulkanRasterizerBuilder(VulkanRasterizerBuilder&&) noexcept = delete;
- constexpr inline virtual ~VulkanRasterizerBuilder() noexcept;
+ virtual ~VulkanRasterizerBuilder() noexcept;
// Builder interface.
public:
///
- inline void build() override;
+ void build() override;
};
///
@@ -101,7 +101,7 @@ namespace LiteFX::Rendering::Backends {
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
};
///
@@ -115,15 +115,15 @@ namespace LiteFX::Rendering::Backends {
///
/// Initializes a Vulkan input assembler builder.
///
- constexpr inline explicit VulkanInputAssemblerBuilder() noexcept;
+ explicit VulkanInputAssemblerBuilder() noexcept;
VulkanInputAssemblerBuilder(const VulkanInputAssemblerBuilder&) noexcept = delete;
VulkanInputAssemblerBuilder(VulkanInputAssemblerBuilder&&) noexcept = delete;
- constexpr inline virtual ~VulkanInputAssemblerBuilder() noexcept;
+ virtual ~VulkanInputAssemblerBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
public:
///
@@ -131,14 +131,14 @@ namespace LiteFX::Rendering::Backends {
///
/// The size of a vertex within the vertex buffer.
/// The binding point to bind the vertex buffer to.
- constexpr inline VulkanVertexBufferLayoutBuilder vertexBuffer(size_t elementSize, UInt32 binding = 0);
+ VulkanVertexBufferLayoutBuilder vertexBuffer(size_t elementSize, UInt32 binding = 0);
///
/// Starts building an index buffer layout.
///
/// The type of the index buffer.
template
- constexpr inline auto indexType(this TSelf&& self, IndexType type) -> TSelf&& {
+ auto indexType(this TSelf&& self, IndexType type) -> TSelf&& {
self.use(makeUnique(type));
return std::forward(self);
}
@@ -158,23 +158,23 @@ namespace LiteFX::Rendering::Backends {
/// The parent pipeline layout builder.
/// The space the descriptor set is bound to.
/// The shader stages, the descriptor set is accessible from.
- constexpr inline explicit VulkanDescriptorSetLayoutBuilder(VulkanPipelineLayoutBuilder& parent, UInt32 space = 0, ShaderStage stages = ShaderStage::Any);
+ explicit VulkanDescriptorSetLayoutBuilder(VulkanPipelineLayoutBuilder& parent, UInt32 space = 0, ShaderStage stages = ShaderStage::Any);
VulkanDescriptorSetLayoutBuilder(const VulkanDescriptorSetLayoutBuilder&) = delete;
VulkanDescriptorSetLayoutBuilder(VulkanDescriptorSetLayoutBuilder&&) = delete;
- constexpr inline virtual ~VulkanDescriptorSetLayoutBuilder() noexcept;
+ virtual ~VulkanDescriptorSetLayoutBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// DescriptorSetLayoutBuilder interface.
protected:
///
- constexpr inline UniquePtr makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors) override;
+ UniquePtr makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors) override;
///
- constexpr inline UniquePtr makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy) override;
+ UniquePtr makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy) override;
};
///
@@ -188,20 +188,20 @@ namespace LiteFX::Rendering::Backends {
///
/// The parent pipeline layout builder.
/// The size of the push constants backing memory.
- constexpr inline explicit VulkanPushConstantsLayoutBuilder(VulkanPipelineLayoutBuilder& parent, UInt32 size);
+ explicit VulkanPushConstantsLayoutBuilder(VulkanPipelineLayoutBuilder& parent, UInt32 size);
VulkanPushConstantsLayoutBuilder(const VulkanPushConstantsLayoutBuilder&) = delete;
VulkanPushConstantsLayoutBuilder(VulkanPushConstantsLayoutBuilder&&) = delete;
- constexpr inline virtual ~VulkanPushConstantsLayoutBuilder() noexcept;
+ virtual ~VulkanPushConstantsLayoutBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// PushConstantsLayoutBuilder interface.
protected:
///
- inline UniquePtr makeRange(ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding) override;
+ UniquePtr makeRange(ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding) override;
};
///
@@ -218,15 +218,15 @@ namespace LiteFX::Rendering::Backends {
///
/// Initializes a new Vulkan pipeline layout builder.
///
- constexpr inline VulkanPipelineLayoutBuilder(const VulkanDevice& device);
+ VulkanPipelineLayoutBuilder(const VulkanDevice& device);
VulkanPipelineLayoutBuilder(VulkanPipelineLayoutBuilder&&) = delete;
VulkanPipelineLayoutBuilder(const VulkanPipelineLayoutBuilder&) = delete;
- constexpr inline virtual ~VulkanPipelineLayoutBuilder() noexcept;
+ virtual ~VulkanPipelineLayoutBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// VulkanPipelineLayoutBuilder.
public:
@@ -235,20 +235,20 @@ namespace LiteFX::Rendering::Backends {
///
/// The space, the descriptor set is bound to.
/// The stages, the descriptor set will be accessible from.
- constexpr inline VulkanDescriptorSetLayoutBuilder descriptorSet(UInt32 space = 0, ShaderStage stages = ShaderStage::Any);
+ VulkanDescriptorSetLayoutBuilder descriptorSet(UInt32 space = 0, ShaderStage stages = ShaderStage::Any);
///
/// Builds a new push constants layout for the pipeline layout.
///
/// The size of the push constants backing memory.
- constexpr inline VulkanPushConstantsLayoutBuilder pushConstants(UInt32 size);
+ VulkanPushConstantsLayoutBuilder pushConstants(UInt32 size);
private:
///
/// Returns the device, the builder has been initialized with.
///
/// A reference of the device, the builder has been initialized with.
- constexpr inline const VulkanDevice& device() const noexcept;
+ const VulkanDevice& device() const noexcept;
};
///
@@ -262,15 +262,15 @@ namespace LiteFX::Rendering::Backends {
///
/// The parent render pass
/// A debug name for the render pipeline.
- constexpr inline explicit VulkanRenderPipelineBuilder(const VulkanRenderPass& renderPass, const String& name = "");
+ explicit VulkanRenderPipelineBuilder(const VulkanRenderPass& renderPass, const String& name = "");
VulkanRenderPipelineBuilder(VulkanRenderPipelineBuilder&&) = delete;
VulkanRenderPipelineBuilder(const VulkanRenderPipelineBuilder&) = delete;
- constexpr inline virtual ~VulkanRenderPipelineBuilder() noexcept;
+ virtual ~VulkanRenderPipelineBuilder() noexcept;
// Builder interface.
public:
///
- inline void build() override;
+ void build() override;
};
///
@@ -284,15 +284,15 @@ namespace LiteFX::Rendering::Backends {
///
/// The parent device
/// A debug name for the compute pipeline.
- constexpr inline explicit VulkanComputePipelineBuilder(const VulkanDevice& device, const String& name = "");
+ explicit VulkanComputePipelineBuilder(const VulkanDevice& device, const String& name = "");
VulkanComputePipelineBuilder(VulkanComputePipelineBuilder&&) = delete;
VulkanComputePipelineBuilder(const VulkanComputePipelineBuilder&) = delete;
- constexpr inline virtual ~VulkanComputePipelineBuilder() noexcept;
+ virtual ~VulkanComputePipelineBuilder() noexcept;
// Builder interface.
public:
///
- inline void build() override;
+ void build() override;
};
///
@@ -307,15 +307,15 @@ namespace LiteFX::Rendering::Backends {
/// The parent device
/// The shader record collection that is used to build the shader binding table for the pipeline.
/// A debug name for the ray-tracing pipeline.
- constexpr inline explicit VulkanRayTracingPipelineBuilder(const VulkanDevice& device, ShaderRecordCollection&& shaderRecords, const String& name = "");
+ explicit VulkanRayTracingPipelineBuilder(const VulkanDevice& device, ShaderRecordCollection&& shaderRecords, const String& name = "");
VulkanRayTracingPipelineBuilder(VulkanRayTracingPipelineBuilder&&) = delete;
VulkanRayTracingPipelineBuilder(const VulkanRayTracingPipelineBuilder&) = delete;
- constexpr inline virtual ~VulkanRayTracingPipelineBuilder() noexcept;
+ virtual ~VulkanRayTracingPipelineBuilder() noexcept;
// Builder interface.
public:
///
- inline void build() override;
+ void build() override;
};
///
@@ -329,7 +329,7 @@ namespace LiteFX::Rendering::Backends {
///
/// The parent device.
/// A debug name for the render pass.
- constexpr inline explicit VulkanRenderPassBuilder(const VulkanDevice& device, const String& name = "") noexcept;
+ explicit VulkanRenderPassBuilder(const VulkanDevice& device, const String& name = "") noexcept;
///
/// Initializes a Vulkan render pass builder.
@@ -337,21 +337,21 @@ namespace LiteFX::Rendering::Backends {
/// The parent device.
/// The number of command buffers to initialize.
/// A debug name for the render pass.
- constexpr inline explicit VulkanRenderPassBuilder(const VulkanDevice& device, UInt32 commandBuffers, const String& name = "") noexcept;
+ explicit VulkanRenderPassBuilder(const VulkanDevice& device, UInt32 commandBuffers, const String& name = "") noexcept;
VulkanRenderPassBuilder(const VulkanRenderPassBuilder&) noexcept = delete;
VulkanRenderPassBuilder(VulkanRenderPassBuilder&&) noexcept = delete;
- constexpr inline virtual ~VulkanRenderPassBuilder() noexcept;
+ virtual ~VulkanRenderPassBuilder() noexcept;
// Builder interface.
protected:
///
- inline void build() override;
+ void build() override;
// RenderPassBuilder interface.
protected:
///
- inline RenderPassDependency makeInputAttachment(DescriptorBindingPoint binding, const RenderTarget& renderTarget) override;
+ RenderPassDependency makeInputAttachment(DescriptorBindingPoint binding, const RenderTarget& renderTarget) override;
};
}
diff --git a/src/Backends/Vulkan/src/barrier.cpp b/src/Backends/Vulkan/src/barrier.cpp
index 520f8724f..c6e21e72a 100644
--- a/src/Backends/Vulkan/src/barrier.cpp
+++ b/src/Backends/Vulkan/src/barrier.cpp
@@ -32,69 +32,69 @@ class VulkanBarrier::VulkanBarrierImpl : public Implement {
// Shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanBarrier::VulkanBarrier(PipelineStage syncBefore, PipelineStage syncAfter) noexcept :
+VulkanBarrier::VulkanBarrier(PipelineStage syncBefore, PipelineStage syncAfter) noexcept :
m_impl(makePimpl(this, syncBefore, syncAfter))
{
}
-constexpr VulkanBarrier::VulkanBarrier() noexcept :
+VulkanBarrier::VulkanBarrier() noexcept :
VulkanBarrier(PipelineStage::None, PipelineStage::None)
{
}
-constexpr VulkanBarrier::~VulkanBarrier() noexcept = default;
+VulkanBarrier::~VulkanBarrier() noexcept = default;
-constexpr PipelineStage VulkanBarrier::syncBefore() const noexcept
+PipelineStage VulkanBarrier::syncBefore() const noexcept
{
return m_impl->m_syncBefore;
}
-constexpr PipelineStage& VulkanBarrier::syncBefore() noexcept
+PipelineStage& VulkanBarrier::syncBefore() noexcept
{
return m_impl->m_syncBefore;
}
-constexpr PipelineStage VulkanBarrier::syncAfter() const noexcept
+PipelineStage VulkanBarrier::syncAfter() const noexcept
{
return m_impl->m_syncAfter;
}
-constexpr PipelineStage& VulkanBarrier::syncAfter() noexcept
+PipelineStage& VulkanBarrier::syncAfter() noexcept
{
return m_impl->m_syncAfter;
}
-constexpr void VulkanBarrier::wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept
+void VulkanBarrier::wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept
{
m_impl->m_globalBarriers.push_back({ accessBefore, accessAfter });
}
-constexpr void VulkanBarrier::transition(const IVulkanBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter)
+void VulkanBarrier::transition(const IVulkanBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter)
{
m_impl->m_bufferBarriers.push_back({ accessBefore, accessAfter, buffer, std::numeric_limits::max() });
}
-constexpr void VulkanBarrier::transition(const IVulkanBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter)
+void VulkanBarrier::transition(const IVulkanBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter)
{
m_impl->m_bufferBarriers.push_back({ accessBefore, accessAfter, buffer, element });
}
-constexpr void VulkanBarrier::transition(const IVulkanImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout)
+void VulkanBarrier::transition(const IVulkanImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout)
{
m_impl->m_imageBarriers.push_back({ accessBefore, accessAfter, image, std::nullopt, layout, 0, image.levels(), 0, image.layers(), 0 });
}
-constexpr void VulkanBarrier::transition(const IVulkanImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout)
+void VulkanBarrier::transition(const IVulkanImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout)
{
m_impl->m_imageBarriers.push_back({ accessBefore, accessAfter, image, fromLayout, toLayout, 0, image.levels(), 0, image.layers(), 0 });
}
-constexpr void VulkanBarrier::transition(const IVulkanImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout)
+void VulkanBarrier::transition(const IVulkanImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout)
{
m_impl->m_imageBarriers.push_back({ accessBefore, accessAfter, image, std::nullopt, layout, level, levels, layer, layers, plane });
}
-constexpr void VulkanBarrier::transition(const IVulkanImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout)
+void VulkanBarrier::transition(const IVulkanImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout)
{
m_impl->m_imageBarriers.push_back({ accessBefore, accessAfter, image, fromLayout, toLayout, level, levels, layer, layers, plane });
}
@@ -179,30 +179,30 @@ void VulkanBarrier::execute(const VulkanCommandBuffer& commandBuffer) const noex
// Builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanBarrierBuilder::VulkanBarrierBuilder() :
+VulkanBarrierBuilder::VulkanBarrierBuilder() :
BarrierBuilder(std::move(UniquePtr(new VulkanBarrier())))
{
}
-constexpr VulkanBarrierBuilder::~VulkanBarrierBuilder() noexcept = default;
+VulkanBarrierBuilder::~VulkanBarrierBuilder() noexcept = default;
-constexpr void VulkanBarrierBuilder::setupStages(PipelineStage waitFor, PipelineStage continueWith)
+void VulkanBarrierBuilder::setupStages(PipelineStage waitFor, PipelineStage continueWith)
{
this->instance()->syncBefore() = waitFor;
this->instance()->syncAfter() = continueWith;
}
-constexpr void VulkanBarrierBuilder::setupGlobalBarrier(ResourceAccess before, ResourceAccess after)
+void VulkanBarrierBuilder::setupGlobalBarrier(ResourceAccess before, ResourceAccess after)
{
this->instance()->wait(before, after);
}
-constexpr void VulkanBarrierBuilder::setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after)
+void VulkanBarrierBuilder::setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after)
{
this->instance()->transition(buffer, before, after);
}
-constexpr void VulkanBarrierBuilder::setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane)
+void VulkanBarrierBuilder::setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane)
{
auto numLevels = levels > 0 ? levels : image.levels() - level;
auto numLayers = layers > 0 ? layers : image.layers() - layer;
diff --git a/src/Backends/Vulkan/src/compute_pipeline.cpp b/src/Backends/Vulkan/src/compute_pipeline.cpp
index 99169ef8f..0f0f6354c 100644
--- a/src/Backends/Vulkan/src/compute_pipeline.cpp
+++ b/src/Backends/Vulkan/src/compute_pipeline.cpp
@@ -132,13 +132,13 @@ void VulkanComputePipeline::bind(const VulkanCommandBuffer& commandBuffer, Span<
// Builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanComputePipelineBuilder::VulkanComputePipelineBuilder(const VulkanDevice& device, const String& name) :
+VulkanComputePipelineBuilder::VulkanComputePipelineBuilder(const VulkanDevice& device, const String& name) :
ComputePipelineBuilder(UniquePtr(new VulkanComputePipeline(device)))
{
this->instance()->name() = name;
}
-constexpr VulkanComputePipelineBuilder::~VulkanComputePipelineBuilder() noexcept = default;
+VulkanComputePipelineBuilder::~VulkanComputePipelineBuilder() noexcept = default;
void VulkanComputePipelineBuilder::build()
{
diff --git a/src/Backends/Vulkan/src/convert.cpp b/src/Backends/Vulkan/src/convert.cpp
index 37cbe4b89..4004e5c53 100644
--- a/src/Backends/Vulkan/src/convert.cpp
+++ b/src/Backends/Vulkan/src/convert.cpp
@@ -2,7 +2,7 @@
using namespace LiteFX::Rendering::Backends;
-constexpr Format LiteFX::Rendering::Backends::Vk::getFormat(const VkFormat& format)
+Format LiteFX::Rendering::Backends::Vk::getFormat(const VkFormat& format)
{
switch (format)
{
@@ -303,7 +303,7 @@ constexpr Format LiteFX::Rendering::Backends::Vk::getFormat(const VkFormat& form
}
}
-constexpr VkFormat LiteFX::Rendering::Backends::Vk::getFormat(Format format)
+VkFormat LiteFX::Rendering::Backends::Vk::getFormat(Format format)
{
switch (format)
{
@@ -604,7 +604,7 @@ constexpr VkFormat LiteFX::Rendering::Backends::Vk::getFormat(Format format)
}
}
-constexpr VkFormat LiteFX::Rendering::Backends::Vk::getFormat(BufferFormat format)
+VkFormat LiteFX::Rendering::Backends::Vk::getFormat(BufferFormat format)
{
switch (format)
{
@@ -661,7 +661,7 @@ constexpr VkFormat LiteFX::Rendering::Backends::Vk::getFormat(BufferFormat forma
}
}
-constexpr PolygonMode LiteFX::Rendering::Backends::Vk::getPolygonMode(const VkPolygonMode& mode)
+PolygonMode LiteFX::Rendering::Backends::Vk::getPolygonMode(const VkPolygonMode& mode)
{
switch (mode)
{
@@ -676,7 +676,7 @@ constexpr PolygonMode LiteFX::Rendering::Backends::Vk::getPolygonMode(const VkPo
}
}
-constexpr VkPolygonMode LiteFX::Rendering::Backends::Vk::getPolygonMode(PolygonMode mode)
+VkPolygonMode LiteFX::Rendering::Backends::Vk::getPolygonMode(PolygonMode mode)
{
switch (mode)
{
@@ -691,7 +691,7 @@ constexpr VkPolygonMode LiteFX::Rendering::Backends::Vk::getPolygonMode(PolygonM
}
}
-constexpr CullMode LiteFX::Rendering::Backends::Vk::getCullMode(const VkCullModeFlags& mode)
+CullMode LiteFX::Rendering::Backends::Vk::getCullMode(const VkCullModeFlags& mode)
{
switch (mode)
{
@@ -708,7 +708,7 @@ constexpr CullMode LiteFX::Rendering::Backends::Vk::getCullMode(const VkCullMode
}
}
-constexpr VkCullModeFlags LiteFX::Rendering::Backends::Vk::getCullMode(CullMode mode)
+VkCullModeFlags LiteFX::Rendering::Backends::Vk::getCullMode(CullMode mode)
{
switch (mode)
{
@@ -725,7 +725,7 @@ constexpr VkCullModeFlags LiteFX::Rendering::Backends::Vk::getCullMode(CullMode
}
}
-constexpr PrimitiveTopology LiteFX::Rendering::Backends::Vk::getPrimitiveTopology(const VkPrimitiveTopology& topology)
+PrimitiveTopology LiteFX::Rendering::Backends::Vk::getPrimitiveTopology(const VkPrimitiveTopology& topology)
{
switch (topology)
{
@@ -744,7 +744,7 @@ constexpr PrimitiveTopology LiteFX::Rendering::Backends::Vk::getPrimitiveTopolog
}
}
-constexpr VkPrimitiveTopology LiteFX::Rendering::Backends::Vk::getPrimitiveTopology(PrimitiveTopology topology)
+VkPrimitiveTopology LiteFX::Rendering::Backends::Vk::getPrimitiveTopology(PrimitiveTopology topology)
{
switch (topology)
{
@@ -763,7 +763,7 @@ constexpr VkPrimitiveTopology LiteFX::Rendering::Backends::Vk::getPrimitiveTopol
}
}
-constexpr ShaderStage LiteFX::Rendering::Backends::Vk::getShaderStage(const VkShaderStageFlagBits& shaderType)
+ShaderStage LiteFX::Rendering::Backends::Vk::getShaderStage(const VkShaderStageFlagBits& shaderType)
{
switch (shaderType)
{
@@ -800,7 +800,7 @@ constexpr ShaderStage LiteFX::Rendering::Backends::Vk::getShaderStage(const VkSh
}
}
-constexpr VkShaderStageFlagBits LiteFX::Rendering::Backends::Vk::getShaderStage(ShaderStage shaderType)
+VkShaderStageFlagBits LiteFX::Rendering::Backends::Vk::getShaderStage(ShaderStage shaderType)
{
switch (shaderType)
{
@@ -838,7 +838,7 @@ constexpr VkShaderStageFlagBits LiteFX::Rendering::Backends::Vk::getShaderStage(
}
}
-constexpr MultiSamplingLevel LiteFX::Rendering::Backends::Vk::getSamples(const VkSampleCountFlagBits& samples)
+MultiSamplingLevel LiteFX::Rendering::Backends::Vk::getSamples(const VkSampleCountFlagBits& samples)
{
switch (samples)
{
@@ -861,7 +861,7 @@ constexpr MultiSamplingLevel LiteFX::Rendering::Backends::Vk::getSamples(const V
}
}
-constexpr VkImageType LiteFX::Rendering::Backends::Vk::getImageType(ImageDimensions dimension)
+VkImageType LiteFX::Rendering::Backends::Vk::getImageType(ImageDimensions dimension)
{
switch (dimension)
{
@@ -877,7 +877,7 @@ constexpr VkImageType LiteFX::Rendering::Backends::Vk::getImageType(ImageDimensi
}
}
-constexpr VkImageViewType LiteFX::Rendering::Backends::Vk::getImageViewType(ImageDimensions dimension, UInt32 layers)
+VkImageViewType LiteFX::Rendering::Backends::Vk::getImageViewType(ImageDimensions dimension, UInt32 layers)
{
switch (dimension)
{
@@ -894,7 +894,7 @@ constexpr VkImageViewType LiteFX::Rendering::Backends::Vk::getImageViewType(Imag
}
}
-constexpr VkSampleCountFlagBits LiteFX::Rendering::Backends::Vk::getSamples(MultiSamplingLevel samples)
+VkSampleCountFlagBits LiteFX::Rendering::Backends::Vk::getSamples(MultiSamplingLevel samples)
{
switch (samples)
{
@@ -917,7 +917,7 @@ constexpr VkSampleCountFlagBits LiteFX::Rendering::Backends::Vk::getSamples(Mult
}
}
-constexpr VkCompareOp LiteFX::Rendering::Backends::Vk::getCompareOp(CompareOperation compareOp)
+VkCompareOp LiteFX::Rendering::Backends::Vk::getCompareOp(CompareOperation compareOp)
{
switch (compareOp) {
case CompareOperation::Never: return VkCompareOp::VK_COMPARE_OP_NEVER;
@@ -932,7 +932,7 @@ constexpr VkCompareOp LiteFX::Rendering::Backends::Vk::getCompareOp(CompareOpera
}
}
-constexpr VkStencilOp LiteFX::Rendering::Backends::Vk::getStencilOp(StencilOperation stencilOp)
+VkStencilOp LiteFX::Rendering::Backends::Vk::getStencilOp(StencilOperation stencilOp)
{
switch (stencilOp) {
case StencilOperation::Keep: return VkStencilOp::VK_STENCIL_OP_KEEP;
@@ -947,7 +947,7 @@ constexpr VkStencilOp LiteFX::Rendering::Backends::Vk::getStencilOp(StencilOpera
}
}
-constexpr VkBlendFactor LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getBlendFactor(BlendFactor blendFactor)
+VkBlendFactor LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getBlendFactor(BlendFactor blendFactor)
{
switch (blendFactor) {
case BlendFactor::Zero: return VkBlendFactor::VK_BLEND_FACTOR_ZERO;
@@ -973,7 +973,7 @@ constexpr VkBlendFactor LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getBl
}
}
-constexpr VkBlendOp LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getBlendOperation(BlendOperation blendOperation)
+VkBlendOp LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getBlendOperation(BlendOperation blendOperation)
{
switch (blendOperation) {
case BlendOperation::Add: return VkBlendOp::VK_BLEND_OP_ADD;
@@ -985,7 +985,7 @@ constexpr VkBlendOp LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getBlendO
}
}
-constexpr VkPipelineStageFlags2 LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getPipelineStage(PipelineStage pipelineStage)
+VkPipelineStageFlags2 LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getPipelineStage(PipelineStage pipelineStage)
{
if (pipelineStage == PipelineStage::None)
return VK_PIPELINE_STAGE_2_NONE;
@@ -1045,7 +1045,7 @@ constexpr VkPipelineStageFlags2 LITEFX_VULKAN_API LiteFX::Rendering::Backends::V
return sync;
}
-constexpr VkAccessFlags2 LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getResourceAccess(ResourceAccess resourceAccess)
+VkAccessFlags2 LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getResourceAccess(ResourceAccess resourceAccess)
{
if (resourceAccess == ResourceAccess::None)
return VK_ACCESS_2_NONE;
@@ -1103,7 +1103,7 @@ constexpr VkAccessFlags2 LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getR
return access;
}
-constexpr VkImageLayout LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getImageLayout(ImageLayout imageLayout)
+VkImageLayout LITEFX_VULKAN_API LiteFX::Rendering::Backends::Vk::getImageLayout(ImageLayout imageLayout)
{
switch (imageLayout) {
case ImageLayout::Common: return VK_IMAGE_LAYOUT_GENERAL;
diff --git a/src/Backends/Vulkan/src/descriptor_set_layout.cpp b/src/Backends/Vulkan/src/descriptor_set_layout.cpp
index 65c39bb30..d24e942c5 100644
--- a/src/Backends/Vulkan/src/descriptor_set_layout.cpp
+++ b/src/Backends/Vulkan/src/descriptor_set_layout.cpp
@@ -572,12 +572,12 @@ size_t VulkanDescriptorSetLayout::pools() const noexcept
// Descriptor set layout builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanDescriptorSetLayoutBuilder::VulkanDescriptorSetLayoutBuilder(VulkanPipelineLayoutBuilder& parent, UInt32 space, ShaderStage stages) :
+VulkanDescriptorSetLayoutBuilder::VulkanDescriptorSetLayoutBuilder(VulkanPipelineLayoutBuilder& parent, UInt32 space, ShaderStage stages) :
DescriptorSetLayoutBuilder(parent, UniquePtr(new VulkanDescriptorSetLayout(parent.device())))
{
}
-constexpr VulkanDescriptorSetLayoutBuilder::~VulkanDescriptorSetLayoutBuilder() noexcept = default;
+VulkanDescriptorSetLayoutBuilder::~VulkanDescriptorSetLayoutBuilder() noexcept = default;
void VulkanDescriptorSetLayoutBuilder::build()
{
@@ -588,12 +588,12 @@ void VulkanDescriptorSetLayoutBuilder::build()
instance->m_impl->initialize();
}
-constexpr UniquePtr VulkanDescriptorSetLayoutBuilder::makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors)
+UniquePtr VulkanDescriptorSetLayoutBuilder::makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors)
{
return makeUnique(type, binding, descriptorSize, descriptors);
}
-constexpr UniquePtr VulkanDescriptorSetLayoutBuilder::makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy)
+UniquePtr VulkanDescriptorSetLayoutBuilder::makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy)
{
return makeUnique(makeUnique(this->parent().device(), magFilter, minFilter, borderU, borderV, borderW, mipMapMode, mipMapBias, minLod, maxLod, anisotropy), binding);
}
diff --git a/src/Backends/Vulkan/src/input_assembler.cpp b/src/Backends/Vulkan/src/input_assembler.cpp
index dd167f310..10aada317 100644
--- a/src/Backends/Vulkan/src/input_assembler.cpp
+++ b/src/Backends/Vulkan/src/input_assembler.cpp
@@ -104,19 +104,19 @@ class VulkanInputAssemblerBuilder::VulkanInputAssemblerBuilderImpl : public Impl
// Builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanInputAssemblerBuilder::VulkanInputAssemblerBuilder() noexcept :
+VulkanInputAssemblerBuilder::VulkanInputAssemblerBuilder() noexcept :
m_impl(makePimpl(this)), InputAssemblerBuilder(SharedPtr(new VulkanInputAssembler()))
{
}
-constexpr VulkanInputAssemblerBuilder::~VulkanInputAssemblerBuilder() noexcept = default;
+VulkanInputAssemblerBuilder::~VulkanInputAssemblerBuilder() noexcept = default;
void VulkanInputAssemblerBuilder::build()
{
this->instance()->m_impl->initialize(m_state.vertexBufferLayouts | std::views::as_rvalue, std::move(m_state.indexBufferLayout), m_state.topology);
}
-constexpr VulkanVertexBufferLayoutBuilder VulkanInputAssemblerBuilder::vertexBuffer(size_t elementSize, UInt32 binding)
+VulkanVertexBufferLayoutBuilder VulkanInputAssemblerBuilder::vertexBuffer(size_t elementSize, UInt32 binding)
{
return VulkanVertexBufferLayoutBuilder(*this, makeUnique(elementSize, binding));
}
diff --git a/src/Backends/Vulkan/src/pipeline_layout.cpp b/src/Backends/Vulkan/src/pipeline_layout.cpp
index 9b7287b2a..a558a4f17 100644
--- a/src/Backends/Vulkan/src/pipeline_layout.cpp
+++ b/src/Backends/Vulkan/src/pipeline_layout.cpp
@@ -160,12 +160,12 @@ class VulkanPipelineLayoutBuilder::VulkanPipelineLayoutBuilderImpl : public Impl
// Pipeline layout builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanPipelineLayoutBuilder::VulkanPipelineLayoutBuilder(const VulkanDevice& parent) :
+VulkanPipelineLayoutBuilder::VulkanPipelineLayoutBuilder(const VulkanDevice& parent) :
m_impl(makePimpl(this, parent)), PipelineLayoutBuilder(SharedPtr(new VulkanPipelineLayout(parent)))
{
}
-constexpr VulkanPipelineLayoutBuilder::~VulkanPipelineLayoutBuilder() noexcept = default;
+VulkanPipelineLayoutBuilder::~VulkanPipelineLayoutBuilder() noexcept = default;
void VulkanPipelineLayoutBuilder::build()
{
@@ -175,17 +175,17 @@ void VulkanPipelineLayoutBuilder::build()
instance->handle() = instance->m_impl->initialize();
}
-constexpr VulkanDescriptorSetLayoutBuilder VulkanPipelineLayoutBuilder::descriptorSet(UInt32 space, ShaderStage stages)
+VulkanDescriptorSetLayoutBuilder VulkanPipelineLayoutBuilder::descriptorSet(UInt32 space, ShaderStage stages)
{
return VulkanDescriptorSetLayoutBuilder(*this, space, stages);
}
-constexpr VulkanPushConstantsLayoutBuilder VulkanPipelineLayoutBuilder::pushConstants(UInt32 size)
+VulkanPushConstantsLayoutBuilder VulkanPipelineLayoutBuilder::pushConstants(UInt32 size)
{
return VulkanPushConstantsLayoutBuilder(*this, size);
}
-constexpr const VulkanDevice& VulkanPipelineLayoutBuilder::device() const noexcept
+const VulkanDevice& VulkanPipelineLayoutBuilder::device() const noexcept
{
return m_impl->m_device;
}
diff --git a/src/Backends/Vulkan/src/push_constants_layout.cpp b/src/Backends/Vulkan/src/push_constants_layout.cpp
index 26a92ae66..0b3813d9e 100644
--- a/src/Backends/Vulkan/src/push_constants_layout.cpp
+++ b/src/Backends/Vulkan/src/push_constants_layout.cpp
@@ -103,12 +103,12 @@ Enumerable VulkanPushConstantsLayout::ranges()
// Push constants layout builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanPushConstantsLayoutBuilder::VulkanPushConstantsLayoutBuilder(VulkanPipelineLayoutBuilder& parent, UInt32 size) :
+VulkanPushConstantsLayoutBuilder::VulkanPushConstantsLayoutBuilder(VulkanPipelineLayoutBuilder& parent, UInt32 size) :
PushConstantsLayoutBuilder(parent, UniquePtr(new VulkanPushConstantsLayout(size)))
{
}
-constexpr VulkanPushConstantsLayoutBuilder::~VulkanPushConstantsLayoutBuilder() noexcept = default;
+VulkanPushConstantsLayoutBuilder::~VulkanPushConstantsLayoutBuilder() noexcept = default;
void VulkanPushConstantsLayoutBuilder::build()
{
diff --git a/src/Backends/Vulkan/src/rasterizer.cpp b/src/Backends/Vulkan/src/rasterizer.cpp
index 94f1a1116..42e2b1ccc 100644
--- a/src/Backends/Vulkan/src/rasterizer.cpp
+++ b/src/Backends/Vulkan/src/rasterizer.cpp
@@ -29,12 +29,12 @@ void VulkanRasterizer::updateLineWidth(Float lineWidth) noexcept
// Builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanRasterizerBuilder::VulkanRasterizerBuilder() noexcept :
+VulkanRasterizerBuilder::VulkanRasterizerBuilder() noexcept :
RasterizerBuilder(SharedPtr(new VulkanRasterizer()))
{
}
-constexpr VulkanRasterizerBuilder::~VulkanRasterizerBuilder() noexcept = default;
+VulkanRasterizerBuilder::~VulkanRasterizerBuilder() noexcept = default;
void VulkanRasterizerBuilder::build()
{
diff --git a/src/Backends/Vulkan/src/ray_tracing_pipeline.cpp b/src/Backends/Vulkan/src/ray_tracing_pipeline.cpp
index 03f31a357..b75dd5659 100644
--- a/src/Backends/Vulkan/src/ray_tracing_pipeline.cpp
+++ b/src/Backends/Vulkan/src/ray_tracing_pipeline.cpp
@@ -359,13 +359,13 @@ void VulkanRayTracingPipeline::bind(const VulkanCommandBuffer& commandBuffer, Sp
// Builder interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanRayTracingPipelineBuilder::VulkanRayTracingPipelineBuilder(const VulkanDevice& device, ShaderRecordCollection&& shaderRecords, const String& name) :
+VulkanRayTracingPipelineBuilder::VulkanRayTracingPipelineBuilder(const VulkanDevice& device, ShaderRecordCollection&& shaderRecords, const String& name) :
RayTracingPipelineBuilder(UniquePtr(new VulkanRayTracingPipeline(device, std::move(shaderRecords))))
{
this->instance()->name() = name;
}
-constexpr VulkanRayTracingPipelineBuilder::~VulkanRayTracingPipelineBuilder() noexcept = default;
+VulkanRayTracingPipelineBuilder::~VulkanRayTracingPipelineBuilder() noexcept = default;
void VulkanRayTracingPipelineBuilder::build()
{
diff --git a/src/Backends/Vulkan/src/render_pass.cpp b/src/Backends/Vulkan/src/render_pass.cpp
index 1bee3b524..7f2f31ce5 100644
--- a/src/Backends/Vulkan/src/render_pass.cpp
+++ b/src/Backends/Vulkan/src/render_pass.cpp
@@ -534,18 +534,18 @@ UInt64 VulkanRenderPass::end() const
// Builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanRenderPassBuilder::VulkanRenderPassBuilder(const VulkanDevice& device, const String& name) noexcept :
+VulkanRenderPassBuilder::VulkanRenderPassBuilder(const VulkanDevice& device, const String& name) noexcept :
VulkanRenderPassBuilder(device, 1, name)
{
}
-constexpr VulkanRenderPassBuilder::VulkanRenderPassBuilder(const VulkanDevice& device, UInt32 commandBuffers, const String& name) noexcept :
+VulkanRenderPassBuilder::VulkanRenderPassBuilder(const VulkanDevice& device, UInt32 commandBuffers, const String& name) noexcept :
RenderPassBuilder(UniquePtr(new VulkanRenderPass(device, name)))
{
m_state.commandBufferCount = commandBuffers;
}
-constexpr VulkanRenderPassBuilder::~VulkanRenderPassBuilder() noexcept = default;
+VulkanRenderPassBuilder::~VulkanRenderPassBuilder() noexcept = default;
void VulkanRenderPassBuilder::build()
{
diff --git a/src/Backends/Vulkan/src/render_pipeline.cpp b/src/Backends/Vulkan/src/render_pipeline.cpp
index def337a7c..113ad504a 100644
--- a/src/Backends/Vulkan/src/render_pipeline.cpp
+++ b/src/Backends/Vulkan/src/render_pipeline.cpp
@@ -531,13 +531,13 @@ void VulkanRenderPipeline::bind(const VulkanCommandBuffer& commandBuffer, Span(new VulkanRenderPipeline(renderPass)))
{
this->instance()->name() = name;
}
-constexpr VulkanRenderPipelineBuilder::~VulkanRenderPipelineBuilder() noexcept = default;
+VulkanRenderPipelineBuilder::~VulkanRenderPipelineBuilder() noexcept = default;
void VulkanRenderPipelineBuilder::build()
{
diff --git a/src/Backends/Vulkan/src/shader_program.cpp b/src/Backends/Vulkan/src/shader_program.cpp
index 9601a4f18..00a892cb0 100644
--- a/src/Backends/Vulkan/src/shader_program.cpp
+++ b/src/Backends/Vulkan/src/shader_program.cpp
@@ -413,12 +413,12 @@ class VulkanShaderProgramBuilder::VulkanShaderProgramBuilderImpl : public Implem
// Shader program builder shared interface.
// ------------------------------------------------------------------------------------------------
-constexpr VulkanShaderProgramBuilder::VulkanShaderProgramBuilder(const VulkanDevice& device) :
+VulkanShaderProgramBuilder::VulkanShaderProgramBuilder(const VulkanDevice& device) :
m_impl(makePimpl(this, device)), ShaderProgramBuilder(SharedPtr(new VulkanShaderProgram(device)))
{
}
-constexpr VulkanShaderProgramBuilder::~VulkanShaderProgramBuilder() noexcept = default;
+VulkanShaderProgramBuilder::~VulkanShaderProgramBuilder() noexcept = default;
void VulkanShaderProgramBuilder::build()
{
@@ -426,12 +426,12 @@ void VulkanShaderProgramBuilder::build()
this->instance()->m_impl->validate();
}
-constexpr UniquePtr VulkanShaderProgramBuilder::makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor)
+UniquePtr VulkanShaderProgramBuilder::makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor)
{
return makeUnique(m_impl->m_device, type, fileName, entryPoint, shaderLocalDescriptor);
}
-constexpr UniquePtr VulkanShaderProgramBuilder::makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor)
+UniquePtr VulkanShaderProgramBuilder::makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor)
{
return makeUnique(m_impl->m_device, type, stream, name, entryPoint, shaderLocalDescriptor);
}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dd4fe51e6..b70650e79 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,13 +11,11 @@ IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
MESSAGE(SEND_ERROR "In-source builds are not allowed.")
ENDIF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
-# Setup modules.
-INCLUDE("${CMAKE_SOURCE_DIR}/cmake/modules.cmake")
-
# Declare top-level project.
PROJECT(LiteFX LANGUAGES CXX)
# Include configuration files.
+INCLUDE("${CMAKE_SOURCE_DIR}/cmake/modules.cmake")
INCLUDE("${CMAKE_SOURCE_DIR}/cmake/version.cmake")
INCLUDE("${CMAKE_SOURCE_DIR}/cmake/options.cmake")
INCLUDE("${CMAKE_SOURCE_DIR}/cmake/config.cmake")
diff --git a/src/CMakePresets.json b/src/CMakePresets.json
index 982e220a4..e279c83a8 100644
--- a/src/CMakePresets.json
+++ b/src/CMakePresets.json
@@ -31,19 +31,24 @@
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
+ "VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_MANIFEST_FEATURES": "pix-support",
"LITEFX_BUILD_SUPPORT_DEBUG_MARKERS": "ON"
}
},
{
- "name": "windows-x64-release",
+ "name": "windows-x64-debug-static",
"inherits": "windows",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "Release"
+ "CMAKE_BUILD_TYPE": "Debug",
+ "BUILD_SHARED_LIBS": "OFF",
+ "VCPKG_TARGET_TRIPLET": "x64-windows-static",
+ "VCPKG_MANIFEST_FEATURES": "pix-support",
+ "LITEFX_BUILD_SUPPORT_DEBUG_MARKERS": "ON"
}
},
{
@@ -56,10 +61,36 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"LITEFX_BUILD_TESTS": "ON",
+ "VCPKG_TARGET_TRIPLET": "x64-windows-rel",
"VCPKG_MANIFEST_FEATURES": "pix-support",
"LITEFX_BUILD_SUPPORT_DEBUG_MARKERS": "ON"
}
},
+ {
+ "name": "windows-x64-release",
+ "inherits": "windows",
+ "architecture": {
+ "value": "x64",
+ "strategy": "external"
+ },
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Release",
+ "VCPKG_TARGET_TRIPLET": "x64-windows-rel"
+ }
+ },
+ {
+ "name": "windows-x64-release-static",
+ "inherits": "windows",
+ "architecture": {
+ "value": "x64",
+ "strategy": "external"
+ },
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Release",
+ "BUILD_SHARED_LIBS": "OFF",
+ "VCPKG_TARGET_TRIPLET": "x64-windows-static-rel"
+ }
+ },
{
"name": "windows-x86-debug",
"inherits": "windows",
@@ -69,18 +100,22 @@
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
+ "VCPKG_TARGET_TRIPLET": "x86-windows",
"LITEFX_BUILD_SUPPORT_DEBUG_MARKERS": "ON"
}
},
{
- "name": "windows-x86-release",
+ "name": "windows-x86-debug-static",
"inherits": "windows",
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "Release"
+ "CMAKE_BUILD_TYPE": "Debug",
+ "BUILD_SHARED_LIBS": "OFF",
+ "VCPKG_TARGET_TRIPLET": "x86-windows-static",
+ "LITEFX_BUILD_SUPPORT_DEBUG_MARKERS": "ON"
}
},
{
@@ -93,18 +128,72 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"LITEFX_BUILD_TESTS": "ON",
+ "VCPKG_TARGET_TRIPLET": "x86-windows-rel",
"LITEFX_BUILD_SUPPORT_DEBUG_MARKERS": "ON"
}
+ },
+ {
+ "name": "windows-x86-release",
+ "inherits": "windows",
+ "architecture": {
+ "value": "x86",
+ "strategy": "external"
+ },
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Release",
+ "VCPKG_TARGET_TRIPLET": "x86-windows-rel"
+ }
+ },
+ {
+ "name": "windows-x86-release-static",
+ "inherits": "windows",
+ "architecture": {
+ "value": "x86",
+ "strategy": "external"
+ },
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Release",
+ "BUILD_SHARED_LIBS": "OFF",
+ "VCPKG_TARGET_TRIPLET": "x86-windows-static-rel"
+ }
}
],
"buildPresets": [
+ {
+ "name": "windows-x64-release",
+ "configurePreset": "windows-x64-release"
+ },
+ {
+ "name": "windows-x64-release-static",
+ "configurePreset": "windows-x64-release-static"
+ },
+ {
+ "name": "windows-x64-test",
+ "configurePreset": "windows-x64-test"
+ },
+ {
+ "name": "windows-x64-debug",
+ "configurePreset": "windows-x64-debug"
+ },
+ {
+ "name": "windows-x64-debug-static",
+ "configurePreset": "windows-x64-debug-static"
+ },
{
"name": "windows-x86-release",
"configurePreset": "windows-x86-release"
},
{
- "name": "windows-x64-release",
- "configurePreset": "windows-x64-release"
+ "name": "windows-x86-release-static",
+ "configurePreset": "windows-x86-release-static"
+ },
+ {
+ "name": "windows-x86-test",
+ "configurePreset": "windows-x86-test"
+ },
+ {
+ "name": "windows-x86-debug",
+ "configurePreset": "windows-x86-debug"
}
],
"testPresets": [
diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt
index db9843557..e51add45c 100644
--- a/src/Core/CMakeLists.txt
+++ b/src/Core/CMakeLists.txt
@@ -25,7 +25,7 @@ SET(CORE_SOURCES
"src/core.cpp"
)
-ADD_LIBRARY(${PROJECT_NAME} SHARED
+ADD_LIBRARY(${PROJECT_NAME}
${CORE_HEADERS}
${CORE_SOURCES}
"${CMAKE_CURRENT_BINARY_DIR}/include/litefx/config.h"
diff --git a/src/Core/include/litefx/containers.hpp b/src/Core/include/litefx/containers.hpp
index 2c4a8504c..c2e3d542a 100644
--- a/src/Core/include/litefx/containers.hpp
+++ b/src/Core/include/litefx/containers.hpp
@@ -27,10 +27,10 @@
#ifndef LITEFX_DEFINE_FLAGS
# define LITEFX_DEFINE_FLAGS(T) \
- inline T operator| (const T lhs, const T rhs) { using _base_t = std::underlying_type_t; return static_cast(static_cast<_base_t>(lhs) | static_cast<_base_t>(rhs)); } \
- inline T& operator|= (T& lhs, const T& rhs) { lhs = lhs | rhs; return lhs; } \
- inline T operator& (const T lhs, const T rhs) { using _base_t = std::underlying_type_t; return static_cast(static_cast<_base_t>(lhs) & static_cast<_base_t>(rhs)); } \
- inline T& operator&= (T& lhs, const T& rhs) { lhs = lhs & rhs; return lhs; }
+ constexpr T operator| (const T lhs, const T rhs) { using _base_t = std::underlying_type_t; return static_cast(static_cast<_base_t>(lhs) | static_cast<_base_t>(rhs)); } \
+ constexpr T& operator|= (T& lhs, const T& rhs) { lhs = lhs | rhs; return lhs; } \
+ constexpr T operator& (const T lhs, const T rhs) { using _base_t = std::underlying_type_t; return static_cast(static_cast<_base_t>(lhs) & static_cast<_base_t>(rhs)); } \
+ constexpr T& operator&= (T& lhs, const T& rhs) { lhs = lhs & rhs; return lhs; }
#endif
#ifndef LITEFX_FLAG_IS_SET
@@ -137,7 +137,7 @@ namespace LiteFX {
/// The type of the object, the pointer points to.
/// A new unique pointer.
template
- constexpr inline [[nodiscard]] UniquePtr makeUnique() {
+ constexpr [[nodiscard]] UniquePtr makeUnique() {
return std::make_unique();
}
@@ -147,7 +147,7 @@ namespace LiteFX {
/// The type of the object, the pointer points to.
/// A new unique pointer.
template
- constexpr inline [[nodiscard]] UniquePtr makeUnique(TArgs&&... _args) {
+ constexpr [[nodiscard]] UniquePtr makeUnique(TArgs&&... _args) {
return std::make_unique(std::forward(_args)...);
}
@@ -157,7 +157,7 @@ namespace LiteFX {
/// The type of the object, the pointer points to.
/// A new shared pointer.
template
- constexpr inline [[nodiscard]] SharedPtr makeShared() {
+ constexpr [[nodiscard]] SharedPtr makeShared() {
return std::make_shared();
}
@@ -167,7 +167,7 @@ namespace LiteFX {
/// The type of the object, the pointer points to.
/// A new shared pointer.
template
- constexpr inline [[nodiscard]] SharedPtr makeShared(TArgs&&... _args) {
+ constexpr [[nodiscard]] SharedPtr makeShared(TArgs&&... _args) {
return std::make_shared(std::forward(_args)...);
}
@@ -178,7 +178,7 @@ namespace LiteFX {
/// The unique pointer that should be turned into a shared pointer.
/// A new shared pointer.
template
- constexpr inline [[nodiscard]] SharedPtr asShared(UniquePtr&& ptr) {
+ constexpr [[nodiscard]] SharedPtr asShared(UniquePtr&& ptr) {
return SharedPtr(ptr.release());
}
@@ -249,7 +249,7 @@ namespace LiteFX {
/// The types of the arguments.
/// The arguments.
template requires meta::are_same
- constexpr explicit inline Enumerable(TArgs&&... args) noexcept
+ constexpr explicit Enumerable(TArgs&&... args) noexcept
{
auto input = std::to_array({ std::forward(args)... });
m_size = input.size();
@@ -425,7 +425,7 @@ namespace LiteFX {
///
/// Initializes a new pointer to an uninitialized implementation instance.
///
- constexpr inline PimplPtr() noexcept = default;
+ constexpr PimplPtr() noexcept = default;
///
/// Initializes a new pointer to a copy of the implementation instance managed by .
@@ -435,13 +435,13 @@ namespace LiteFX {
/// of both implementation pointers manually!
///
/// The source pointer to copy the implementation instance from.
- constexpr inline PimplPtr(const PimplPtr& src) noexcept : m_ptr(new pImpl(*src.m_ptr)) { }
+ constexpr PimplPtr(const PimplPtr& src) noexcept : m_ptr(new pImpl(*src.m_ptr)) { }
///
/// Initializes a new pointer by taking over the implementation instance managed by .
///
/// The source pointer to take over.
- constexpr inline PimplPtr(PimplPtr&& src) noexcept = default;
+ constexpr PimplPtr(PimplPtr&& src) noexcept = default;
///
/// Initializes a new pointer to a copy of the implementation instance managed by .
@@ -452,58 +452,58 @@ namespace LiteFX {
///
/// The source pointer to copy the implementation instance from.
/// A new pointer to the provided implementation instance.
- constexpr inline PimplPtr& operator= (const PimplPtr& src) noexcept { m_ptr.reset(new pImpl(*src.m_ptr)); return *this; }
+ constexpr PimplPtr& operator= (const PimplPtr& src) noexcept { m_ptr.reset(new pImpl(*src.m_ptr)); return *this; }
///
/// Initializes a new pointer by taking over the implementation instance managed by .
///
/// The source pointer to take over.
/// /// A new pointer to the provided implementation instance.
- constexpr inline PimplPtr& operator= (PimplPtr&& src) noexcept = default;
+ constexpr PimplPtr& operator= (PimplPtr&& src) noexcept = default;
- constexpr inline ~PimplPtr() noexcept = default;
+ constexpr ~PimplPtr() noexcept = default;
private:
///
/// Initializes a new pointer from the raw pointer provided with .
///
/// The raw pointer to take ownership over.
- constexpr inline PimplPtr(pImpl* pimpl) noexcept : m_ptr(pimpl) { }
+ constexpr PimplPtr(pImpl* pimpl) noexcept : m_ptr(pimpl) { }
public:
///
/// Destroys the implementation instance managed by this pointer.
///
- constexpr inline void destroy() { m_ptr = nullptr; }
+ constexpr void destroy() { m_ptr = nullptr; }
///
/// Releases the implementation instance managed by this pointer and returns it.
///
/// The pointer to the managed implementation instance.
- constexpr inline pImpl* release() noexcept { m_ptr.release(); }
+ constexpr pImpl* release() noexcept { m_ptr.release(); }
///
/// Returns a pointer to the managed implementation instance.
///
/// A pointer to the managed implementation instance.
- constexpr inline pImpl* get() const noexcept { return m_ptr.get(); }
+ constexpr pImpl* get() const noexcept { return m_ptr.get(); }
public:
///
/// Returns a reference to the managed implementation instance.
///
/// A reference to the managed implementation instance.
- constexpr inline pImpl& operator* () const noexcept { return *m_ptr; }
+ constexpr pImpl& operator* () const noexcept { return *m_ptr; }
///
/// Returns a pointer to the managed implementation instance.
///
/// A pointer to the managed implementation instance.
- constexpr inline pImpl* operator-> () const noexcept { return m_ptr.get(); }
+ constexpr pImpl* operator-> () const noexcept { return m_ptr.get(); }
public:
template
- friend constexpr inline PimplPtr makePimpl(Arg&&... arg);
+ friend constexpr PimplPtr makePimpl(Arg&&... arg);
};
///
@@ -514,7 +514,7 @@ namespace LiteFX {
/// The arguments forwarded to the implementation classes' constructor.
/// The pointer to the implementation class instance.
template
- constexpr inline [[nodiscard]] PimplPtr makePimpl(Arg&&... arg) {
+ constexpr [[nodiscard]] PimplPtr makePimpl(Arg&&... arg) {
return PimplPtr(new T(std::forward(arg)...));
}
@@ -550,14 +550,14 @@ namespace LiteFX {
/// Initializes the implementation instance.
///
/// The pointer to the parent public interface instance.
- constexpr inline Implement(TInterface* parent) : m_parent(parent) {
+ constexpr Implement(TInterface* parent) : m_parent(parent) {
if (parent == nullptr)
throw std::runtime_error("Initializing an implementation requires the parent to be provided.");
}
Implement(Implement&&) = delete;
Implement(const Implement&) = delete;
- constexpr inline virtual ~Implement() = default;
+ constexpr virtual ~Implement() = default;
};
///
@@ -660,36 +660,36 @@ namespace LiteFX {
/// Returns a pointer to the current instance of the object that is built by the builder.
///
/// A pointer to the current object instance.
- constexpr inline const T* instance() const noexcept { return m_instance.get(); }
+ constexpr const T* instance() const noexcept { return m_instance.get(); }
protected:
///
/// Returns a pointer to the current instance of the object that is built by the builder.
///
/// A pointer to the current object instance.
- constexpr inline T* instance() noexcept { return m_instance.get(); }
+ constexpr T* instance() noexcept { return m_instance.get(); }
public:
///
/// Initializes the builder instance.
///
/// The instance of the object to build.
- constexpr inline explicit Builder(TPointer&& instance) noexcept : m_instance(std::move(instance)) { }
+ constexpr explicit Builder(TPointer&& instance) noexcept : m_instance(std::move(instance)) { }
///
/// Initializes the builder instance by taking over another instance.
///
/// The instance of another builder object to take over.
- constexpr inline Builder(Builder&& _other) noexcept : m_instance(std::move(_other.m_instance)) { }
+ constexpr Builder(Builder&& _other) noexcept : m_instance(std::move(_other.m_instance)) { }
- constexpr inline Builder(const Builder&) = delete;
- constexpr inline virtual ~Builder() noexcept = default;
+ constexpr Builder(const Builder&) = delete;
+ constexpr virtual ~Builder() noexcept = default;
protected:
///
/// Can be overwritten to perform any pre-construction work before the builder returns the final object instance.
///
- constexpr inline virtual void build() { };
+ constexpr virtual void build() { };
public:
// TODO: Provide concept (`is_buildable`)
@@ -706,7 +706,7 @@ namespace LiteFX {
///
/// Calls and returns the instance.
///
- constexpr inline [[nodiscard]] operator TPointer&& () {
+ constexpr [[nodiscard]] operator TPointer&& () {
this->build();
return std::move(m_instance);
}
@@ -734,20 +734,20 @@ namespace LiteFX {
/// Returns a pointer to the current instance of the object that is built by the builder.
///
/// A pointer to the current object instance.
- constexpr inline const T* instance() const noexcept { return m_instance.get(); }
+ constexpr const T* instance() const noexcept { return m_instance.get(); }
///
/// Returns a reference of the parent builder.
///
/// A reference of the parent builder.
- constexpr inline const TParent& parent() const noexcept { return m_parent; }
+ constexpr const TParent& parent() const noexcept { return m_parent; }
protected:
///
/// Returns a pointer to the current instance of the object that is built by the builder.
///
/// A pointer to the current object instance.
- constexpr inline T* instance() noexcept { return m_instance.get(); }
+ constexpr T* instance() noexcept { return m_instance.get(); }
public:
///
@@ -755,22 +755,22 @@ namespace LiteFX {
///
/// The instance of the parent builder.
/// The instance of the object to build.
- constexpr inline explicit Builder(TParent& parent, TPointer&& instance) noexcept : m_parent(parent), m_instance(std::move(instance)) { }
+ constexpr explicit Builder(TParent& parent, TPointer&& instance) noexcept : m_parent(parent), m_instance(std::move(instance)) { }
///
/// Initializes the builder instance by taking over another instance.
///
/// The instance of another builder object to take over.
- constexpr inline Builder(Builder&& _other) noexcept : m_instance(std::move(_other.m_instance)), m_parent(_other.m_parent) { }
+ constexpr Builder(Builder&& _other) noexcept : m_instance(std::move(_other.m_instance)), m_parent(_other.m_parent) { }
- constexpr inline Builder(const Builder&) = delete;
- constexpr inline virtual ~Builder() noexcept = default;
+ constexpr Builder(const Builder&) = delete;
+ constexpr virtual ~Builder() noexcept = default;
protected:
///
/// Can be overwritten to perform any pre-construction work before the builder returns the final object instance.
///
- constexpr inline virtual void build() { };
+ constexpr virtual void build() { };
public:
// TODO: Provide concept (`is_buildable`)
@@ -787,7 +787,7 @@ namespace LiteFX {
///
/// First, calls , then `use` on the parent builder using the current object instance and finally returns the parent builder.
///
- constexpr inline [[nodiscard]] TParent& add() {
+ constexpr [[nodiscard]] TParent& add() {
this->build();
m_parent.use(std::move(m_instance));
return m_parent;
diff --git a/src/Core/include/litefx/string.hpp b/src/Core/include/litefx/string.hpp
index e4c7d2ef5..c0ffb8806 100644
--- a/src/Core/include/litefx/string.hpp
+++ b/src/Core/include/litefx/string.hpp
@@ -26,13 +26,13 @@ namespace LiteFX {
using StringView = std::string_view;
using WStringView = std::wstring_view;
- constexpr inline auto Join(std::ranges::input_range auto&& elements, StringView delimiter = ""sv) noexcept requires
+ constexpr auto Join(std::ranges::input_range auto&& elements, StringView delimiter = ""sv) noexcept requires
std::convertible_to, String>
{
return std::ranges::fold_left(elements | std::views::join_with(delimiter), String{}, std::plus<>{});
}
- constexpr inline auto WJoin(std::ranges::input_range auto&& elements, WStringView delimiter = L""sv) noexcept requires
+ constexpr auto WJoin(std::ranges::input_range auto&& elements, WStringView delimiter = L""sv) noexcept requires
std::convertible_to, String>
{
return std::ranges::fold_left(elements | std::views::join_with(delimiter), WString{}, std::plus<>{});
@@ -43,7 +43,7 @@ namespace LiteFX {
///
/// The string to hash.
/// The FNVa hash for .
- constexpr static inline std::uint64_t hash(StringView string) noexcept
+ constexpr static std::uint64_t hash(StringView string) noexcept
{
const std::uint64_t prime = 0x00000100000001b3;
std::uint64_t seed = 0xcbf29ce484222325;
@@ -59,7 +59,7 @@ namespace LiteFX {
///
/// The string to hash.
/// The FNVa hash for .
- constexpr static inline std::uint64_t hash(WStringView string) noexcept
+ constexpr static std::uint64_t hash(WStringView string) noexcept
{
const std::uint64_t prime = 0x00000100000001b3;
std::uint64_t seed = 0xcbf29ce484222325;
@@ -76,7 +76,7 @@ namespace LiteFX {
/// The string to hash.
/// The number of characters in the string.
/// The FNVa hash for .
- consteval inline std::uint64_t operator"" _hash(const char* string, size_t chars) noexcept
+ consteval std::uint64_t operator"" _hash(const char* string, size_t chars) noexcept
{
return hash(StringView(string, chars));
}
@@ -87,7 +87,7 @@ namespace LiteFX {
/// The string to hash.
/// The number of characters in the string.
/// The FNVa hash for .
- consteval inline std::uint64_t operator"" _hash(const wchar_t* string, size_t chars) noexcept
+ consteval std::uint64_t operator"" _hash(const wchar_t* string, size_t chars) noexcept
{
return hash(WStringView(string, chars));
}
diff --git a/src/Graphics/CMakeLists.txt b/src/Graphics/CMakeLists.txt
index 90350b5ec..5e27b2d35 100644
--- a/src/Graphics/CMakeLists.txt
+++ b/src/Graphics/CMakeLists.txt
@@ -19,7 +19,7 @@ SET(GRAPHICS_SOURCES
)
# Add shared library project.
-ADD_LIBRARY(${PROJECT_NAME} SHARED
+ADD_LIBRARY(${PROJECT_NAME}
${GRAPHICS_HEADERS}
${GRAPHICS_SOURCES}
)
@@ -51,6 +51,11 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME}
PUBLIC LiteFX.Core LiteFX.Logging LiteFX.Math
)
+# Pre-define export specifier, to prevent dllimport/dllexport from being be emitted.
+IF(NOT BUILD_SHARED_LIBS)
+ TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PUBLIC -DLITEFX_GRAPHICS_API=)
+ENDIF(NOT BUILD_SHARED_LIBS)
+
# Re-use pre-compiled core header.
IF(LITEFX_BUILD_PRECOMPILED_HEADERS)
TARGET_PRECOMPILE_HEADERS(${PROJECT_NAME} REUSE_FROM LiteFX.Core)
diff --git a/src/Graphics/include/litefx/graphics_api.hpp b/src/Graphics/include/litefx/graphics_api.hpp
index fa5bdd435..d8ed0b239 100644
--- a/src/Graphics/include/litefx/graphics_api.hpp
+++ b/src/Graphics/include/litefx/graphics_api.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include
+
#if !defined (LITEFX_GRAPHICS_API)
# if defined(LiteFX_Graphics_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_GRAPHICS_API __declspec(dllexport)
@@ -8,7 +10,7 @@
# elif !defined(LiteFX_Graphics_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_GRAPHICS_API __declspec(dllimport)
# endif
-#endif
+#endif
#ifndef LITEFX_GRAPHICS_API
# define LITEFX_GRAPHICS_API
diff --git a/src/Logging/CMakeLists.txt b/src/Logging/CMakeLists.txt
index 963732708..93dc1fade 100644
--- a/src/Logging/CMakeLists.txt
+++ b/src/Logging/CMakeLists.txt
@@ -23,7 +23,7 @@ SET(LOGGING_SOURCES
)
# Add shared library project.
-ADD_LIBRARY(${PROJECT_NAME} SHARED
+ADD_LIBRARY(${PROJECT_NAME}
${LOGGING_HEADERS}
${LOGGING_SOURCES}
)
@@ -55,6 +55,11 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME}
PUBLIC LiteFX.Core spdlog::spdlog
)
+# Pre-define export specifier, to prevent dllimport/dllexport from being be emitted.
+IF(NOT BUILD_SHARED_LIBS)
+ TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PUBLIC -DLITEFX_LOGGING_API=)
+ENDIF(NOT BUILD_SHARED_LIBS)
+
# Re-use pre-compiled core header.
IF(LITEFX_BUILD_PRECOMPILED_HEADERS)
TARGET_PRECOMPILE_HEADERS(${PROJECT_NAME} REUSE_FROM LiteFX.Core)
diff --git a/src/Logging/include/litefx/logging.hpp b/src/Logging/include/litefx/logging.hpp
index 95ef5e062..6d6cf171c 100644
--- a/src/Logging/include/litefx/logging.hpp
+++ b/src/Logging/include/litefx/logging.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include
+
#if !defined (LITEFX_LOGGING_API)
# if defined(LiteFX_Logging_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_LOGGING_API __declspec(dllexport)
@@ -8,7 +10,7 @@
# elif !defined(LiteFX_Logging_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_LOGGING_API __declspec(dllimport)
# endif
-#endif
+#endif
#ifndef LITEFX_LOGGING_API
# define LITEFX_LOGGING_API
@@ -119,7 +121,7 @@ namespace LiteFX::Logging {
///
/// Gets the name of the logger.
///
- virtual inline const String& getName() const noexcept;
+ virtual const String& getName() const noexcept;
protected:
virtual void log(LogLevel level, StringView message);
diff --git a/src/Math/CMakeLists.txt b/src/Math/CMakeLists.txt
index 0256f5c6e..070573df1 100644
--- a/src/Math/CMakeLists.txt
+++ b/src/Math/CMakeLists.txt
@@ -35,7 +35,7 @@ SET(VULKAN_MATH_SOURCES
)
# Add shared library project.
-ADD_LIBRARY(${PROJECT_NAME} SHARED
+ADD_LIBRARY(${PROJECT_NAME}
${VULKAN_MATH_HEADERS}
${VULKAN_MATH_SOURCES}
)
@@ -67,6 +67,11 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME}
PUBLIC LiteFX.Core ${DEPENDENCY_PACKAGES}
)
+# Pre-define export specifier, to prevent dllimport/dllexport from being be emitted.
+IF(NOT BUILD_SHARED_LIBS)
+ TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PUBLIC -DLITEFX_MATH_API=)
+ENDIF(NOT BUILD_SHARED_LIBS)
+
# Re-use pre-compiled core header.
IF(LITEFX_BUILD_PRECOMPILED_HEADERS)
TARGET_PRECOMPILE_HEADERS(${PROJECT_NAME} REUSE_FROM LiteFX.Core)
diff --git a/src/Math/include/litefx/math.hpp b/src/Math/include/litefx/math.hpp
index b1de742e0..1c1ce6456 100644
--- a/src/Math/include/litefx/math.hpp
+++ b/src/Math/include/litefx/math.hpp
@@ -10,7 +10,7 @@
# elif !defined(LiteFX_Math_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_MATH_API __declspec(dllimport)
# endif
-#endif
+#endif
#ifndef LITEFX_MATH_API
# define LITEFX_MATH_API
@@ -80,7 +80,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the byte.
/// The value as byte.
- inline constexpr Byte operator "" _b(unsigned long long int arg) noexcept {
+ constexpr Byte operator "" _b(unsigned long long int arg) noexcept {
return static_cast(arg);
}
@@ -89,7 +89,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the integer.
/// The value as 16 bit integer.
- inline constexpr Int16 operator "" _i16(unsigned long long int arg) noexcept {
+ constexpr Int16 operator "" _i16(unsigned long long int arg) noexcept {
return static_cast(arg);
}
@@ -98,7 +98,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the integer.
/// The value as 16 bit unsigned integer.
- inline constexpr UInt16 operator "" _ui16(unsigned long long int arg) noexcept {
+ constexpr UInt16 operator "" _ui16(unsigned long long int arg) noexcept {
return static_cast(arg);
}
@@ -107,7 +107,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the integer.
/// The value as 32 bit integer.
- inline constexpr Int32 operator "" _i32(unsigned long long int arg) noexcept {
+ constexpr Int32 operator "" _i32(unsigned long long int arg) noexcept {
return static_cast(arg);
}
@@ -116,7 +116,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the integer.
/// The value as 32 bit unsigned integer.
- inline constexpr UInt32 operator "" _ui32(unsigned long long int arg) noexcept {
+ constexpr UInt32 operator "" _ui32(unsigned long long int arg) noexcept {
return static_cast(arg);
}
@@ -125,7 +125,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the integer.
/// The value as 64 bit integer.
- inline constexpr Int64 operator "" _i64(unsigned long long int arg) noexcept {
+ constexpr Int64 operator "" _i64(unsigned long long int arg) noexcept {
return static_cast(arg);
}
@@ -134,7 +134,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the integer.
/// The value as 64 bit unsigned integer.
- inline constexpr UInt64 operator "" _ui64(unsigned long long int arg) noexcept {
+ constexpr UInt64 operator "" _ui64(unsigned long long int arg) noexcept {
return static_cast(arg);
}
@@ -143,7 +143,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the floating point number.
/// The value as floating point number.
- inline constexpr Float operator "" _f32(long double arg) noexcept {
+ constexpr Float operator "" _f32(long double arg) noexcept {
return static_cast(arg);
}
@@ -152,7 +152,7 @@ namespace LiteFX::Math {
///
/// The value that should be assigned to the floating point number.
/// The value as floating point number.
- inline constexpr Double operator "" _f64(long double arg) noexcept {
+ constexpr Double operator "" _f64(long double arg) noexcept {
return static_cast(arg);
}
@@ -164,7 +164,7 @@ namespace LiteFX::Math {
/// The alignment to align the value to.
/// The aligned value.
template
- static constexpr inline T align(T size, T alignment) {
+ static constexpr T align(T size, T alignment) {
return (size + alignment - 1) & ~(alignment - 1);
}
@@ -193,7 +193,7 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `glm::f32vec1`.
///
- inline operator glm::f32vec1() const noexcept;
+ operator glm::f32vec1() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -213,7 +213,7 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `DirectX::XMVECTOR`.
///
- inline operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
#endif
};
@@ -243,7 +243,7 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `glm::u32vec1`.
///
- inline operator glm::u32vec1() const noexcept;
+ operator glm::u32vec1() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -263,7 +263,7 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `DirectX::XMVECTOR`.
///
- inline operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
#endif
};
@@ -291,7 +291,7 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `glm::f32vec2`.
///
- inline operator glm::f32vec2() const noexcept;
+ operator glm::f32vec2() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -323,12 +323,12 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `DirectX::XMVECTOR`.
///
- inline operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
///
/// Converts the vector into the type `DirectX::XMFLOAT2`.
///
- inline operator DirectX::XMFLOAT2() const noexcept;
+ operator DirectX::XMFLOAT2() const noexcept;
#endif
};
@@ -356,7 +356,7 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `glm::u32vec2`.
///
- inline operator glm::u32vec2() const noexcept;
+ operator glm::u32vec2() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -388,12 +388,12 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `DirectX::XMVECTOR`.
///
- inline operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
///
/// Converts the vector into the type `DirectX::XMUINT2`.
///
- inline operator DirectX::XMUINT2() const noexcept;
+ operator DirectX::XMUINT2() const noexcept;
#endif
};
@@ -421,7 +421,7 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `glm::i32vec2`.
///
- inline operator glm::i32vec2() const noexcept;
+ operator glm::i32vec2() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -453,12 +453,12 @@ namespace LiteFX::Math {
///
/// Converts the vector into the type `DirectX::XMVECTOR`.
///
- inline operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
///
/// Converts the vector into the type `DirectX::XMINT2`.
///
- inline operator DirectX::XMINT2() const noexcept;
+ operator DirectX::XMINT2() const noexcept;
#endif
};
@@ -473,7 +473,7 @@ namespace LiteFX::Math {
public:
Vector3f(const glm::f32vec3& v) noexcept;
Vector3f(glm::f32vec3&& v) noexcept;
- inline operator glm::f32vec3() const noexcept;
+ operator glm::f32vec3() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -482,8 +482,8 @@ namespace LiteFX::Math {
Vector3f(DirectX::XMVECTOR&& v) noexcept;
Vector3f(const DirectX::XMFLOAT3& v) noexcept;
Vector3f(DirectX::XMFLOAT3&& v) noexcept;
- inline operator DirectX::XMVECTOR() const noexcept;
- inline operator DirectX::XMFLOAT3() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMFLOAT3() const noexcept;
#endif
};
@@ -495,7 +495,7 @@ namespace LiteFX::Math {
public:
Vector3u(const glm::u32vec3& v) noexcept;
Vector3u(glm::u32vec3&& v) noexcept;
- inline operator glm::u32vec3() const noexcept;
+ operator glm::u32vec3() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -504,8 +504,8 @@ namespace LiteFX::Math {
Vector3u(DirectX::XMVECTOR&& v) noexcept;
Vector3u(const DirectX::XMUINT3& v) noexcept;
Vector3u(DirectX::XMUINT3&& v) noexcept;
- inline operator DirectX::XMVECTOR() const noexcept;
- inline operator DirectX::XMUINT3() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMUINT3() const noexcept;
#endif
};
@@ -517,7 +517,7 @@ namespace LiteFX::Math {
public:
Vector3i(const glm::i32vec3& v) noexcept;
Vector3i(glm::i32vec3&& v) noexcept;
- inline operator glm::i32vec3() const noexcept;
+ operator glm::i32vec3() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -526,8 +526,8 @@ namespace LiteFX::Math {
Vector3i(DirectX::XMVECTOR&& v) noexcept;
Vector3i(const DirectX::XMINT3& v) noexcept;
Vector3i(DirectX::XMINT3&& v) noexcept;
- inline operator DirectX::XMVECTOR() const noexcept;
- inline operator DirectX::XMINT3() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMINT3() const noexcept;
#endif
};
@@ -539,7 +539,7 @@ namespace LiteFX::Math {
public:
Vector4f(const glm::f32vec4& v) noexcept;
Vector4f(glm::f32vec4&& v) noexcept;
- inline operator glm::f32vec4() const noexcept;
+ operator glm::f32vec4() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -548,8 +548,8 @@ namespace LiteFX::Math {
Vector4f(DirectX::XMVECTOR&& v) noexcept;
Vector4f(const DirectX::XMFLOAT4& v) noexcept;
Vector4f(DirectX::XMFLOAT4&& v) noexcept;
- inline operator DirectX::XMVECTOR() const noexcept;
- inline operator DirectX::XMFLOAT4() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMFLOAT4() const noexcept;
#endif
};
@@ -561,7 +561,7 @@ namespace LiteFX::Math {
public:
Vector4u(const glm::u32vec4& v) noexcept;
Vector4u(glm::u32vec4&& v) noexcept;
- inline operator glm::u32vec4() const noexcept;
+ operator glm::u32vec4() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -570,8 +570,8 @@ namespace LiteFX::Math {
Vector4u(DirectX::XMVECTOR&& v) noexcept;
Vector4u(const DirectX::XMUINT4& v) noexcept;
Vector4u(DirectX::XMUINT4&& v) noexcept;
- inline operator DirectX::XMVECTOR() const noexcept;
- inline operator DirectX::XMUINT4() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMUINT4() const noexcept;
#endif
};
@@ -583,7 +583,7 @@ namespace LiteFX::Math {
public:
Vector4i(const glm::i32vec4& v) noexcept;
Vector4i(glm::i32vec4&& v) noexcept;
- inline operator glm::i32vec4() const noexcept;
+ operator glm::i32vec4() const noexcept;
#endif
#if defined(LITEFX_BUILD_WITH_DIRECTX_MATH)
@@ -592,8 +592,8 @@ namespace LiteFX::Math {
Vector4i(DirectX::XMVECTOR&& v) noexcept;
Vector4i(const DirectX::XMINT4& v) noexcept;
Vector4i(DirectX::XMINT4&& v) noexcept;
- inline operator DirectX::XMVECTOR() const noexcept;
- inline operator DirectX::XMINT4() const noexcept;
+ operator DirectX::XMVECTOR() const noexcept;
+ operator DirectX::XMINT4() const noexcept;
#endif
};
@@ -794,26 +794,26 @@ namespace LiteFX::Math {
//virtual ~Size4d() noexcept = default;
public:
- inline Size4d& operator=(const Size4d& _other) noexcept;
- inline Size4d& operator=(Size4d&& _other) noexcept;
- inline Size4d operator/(size_t s) noexcept;
- inline Size4d& operator/=(size_t s) noexcept;
- inline Size4d operator*(size_t s) noexcept;
- inline Size4d& operator*=(size_t s) noexcept;
- inline Size4d operator+(const Size4d& s) noexcept;
- inline Size4d& operator+=(const Size4d& s) noexcept;
- inline Size4d operator-(const Size4d& s) noexcept;
- inline Size4d& operator-=(const Size4d& s) noexcept;
-
- public:
- inline size_t width() const noexcept;
- inline size_t& width() noexcept;
- inline size_t height() const noexcept;
- inline size_t& height() noexcept;
- inline size_t depth() const noexcept;
- inline size_t& depth() noexcept;
- inline size_t alpha() const noexcept;
- inline size_t& alpha() noexcept;
+ Size4d& operator=(const Size4d& _other) noexcept;
+ Size4d& operator=(Size4d&& _other) noexcept;
+ Size4d operator/(size_t s) noexcept;
+ Size4d& operator/=(size_t s) noexcept;
+ Size4d operator*(size_t s) noexcept;
+ Size4d& operator*=(size_t s) noexcept;
+ Size4d operator+(const Size4d& s) noexcept;
+ Size4d& operator+=(const Size4d& s) noexcept;
+ Size4d operator-(const Size4d& s) noexcept;
+ Size4d& operator-=(const Size4d& s) noexcept;
+
+ public:
+ size_t width() const noexcept;
+ size_t& width() noexcept;
+ size_t height() const noexcept;
+ size_t& height() noexcept;
+ size_t depth() const noexcept;
+ size_t& depth() noexcept;
+ size_t alpha() const noexcept;
+ size_t& alpha() noexcept;
};
class LITEFX_MATH_API Size3d : public Vector {
@@ -826,25 +826,25 @@ namespace LiteFX::Math {
//virtual ~Size3d() noexcept = default;
public:
- inline Size3d& operator=(const Size3d& _other) noexcept;
- inline Size3d& operator=(Size3d&& _other) noexcept;
- inline operator Size4d() const noexcept;
- inline Size3d operator/(size_t s) noexcept;
- inline Size3d& operator/=(size_t s) noexcept;
- inline Size3d operator*(size_t s) noexcept;
- inline Size3d& operator*=(size_t s) noexcept;
- inline Size3d operator+(const Size3d& s) noexcept;
- inline Size3d& operator+=(const Size3d& s) noexcept;
- inline Size3d operator-(const Size3d& s) noexcept;
- inline Size3d& operator-=(const Size3d& s) noexcept;
-
- public:
- inline size_t width() const noexcept;
- inline size_t& width() noexcept;
- inline size_t height() const noexcept;
- inline size_t& height() noexcept;
- inline size_t depth() const noexcept;
- inline size_t& depth() noexcept;
+ Size3d& operator=(const Size3d& _other) noexcept;
+ Size3d& operator=(Size3d&& _other) noexcept;
+ operator Size4d() const noexcept;
+ Size3d operator/(size_t s) noexcept;
+ Size3d& operator/=(size_t s) noexcept;
+ Size3d operator*(size_t s) noexcept;
+ Size3d& operator*=(size_t s) noexcept;
+ Size3d operator+(const Size3d& s) noexcept;
+ Size3d& operator+=(const Size3d& s) noexcept;
+ Size3d operator-(const Size3d& s) noexcept;
+ Size3d& operator-=(const Size3d& s) noexcept;
+
+ public:
+ size_t width() const noexcept;
+ size_t& width() noexcept;
+ size_t height() const noexcept;
+ size_t& height() noexcept;
+ size_t depth() const noexcept;
+ size_t& depth() noexcept;
};
class LITEFX_MATH_API Size2d : public Vector {
@@ -857,24 +857,24 @@ namespace LiteFX::Math {
//virtual ~Size2d() noexcept = default;
public:
- inline Size2d& operator=(const Size2d& _other) noexcept;
- inline Size2d& operator=(Size2d&& _other) noexcept;
- inline operator Size3d() const noexcept;
- inline operator Size4d() const noexcept;
- inline Size2d operator/(size_t s) noexcept;
- inline Size2d& operator/=(size_t s) noexcept;
- inline Size2d operator*(size_t s) noexcept;
- inline Size2d& operator*=(size_t s) noexcept;
- inline Size2d operator+(const Size2d& s) noexcept;
- inline Size2d& operator+=(const Size2d& s) noexcept;
- inline Size2d operator-(const Size2d& s) noexcept;
- inline Size2d& operator-=(const Size2d& s) noexcept;
-
- public:
- inline size_t width() const noexcept;
- inline size_t& width() noexcept;
- inline size_t height() const noexcept;
- inline size_t& height() noexcept;
+ Size2d& operator=(const Size2d& _other) noexcept;
+ Size2d& operator=(Size2d&& _other) noexcept;
+ operator Size3d() const noexcept;
+ operator Size4d() const noexcept;
+ Size2d operator/(size_t s) noexcept;
+ Size2d& operator/=(size_t s) noexcept;
+ Size2d operator*(size_t s) noexcept;
+ Size2d& operator*=(size_t s) noexcept;
+ Size2d operator+(const Size2d& s) noexcept;
+ Size2d& operator+=(const Size2d& s) noexcept;
+ Size2d operator-(const Size2d& s) noexcept;
+ Size2d& operator-=(const Size2d& s) noexcept;
+
+ public:
+ size_t width() const noexcept;
+ size_t& width() noexcept;
+ size_t height() const noexcept;
+ size_t& height() noexcept;
};
#pragma endregion
@@ -889,16 +889,16 @@ namespace LiteFX::Math {
//virtual ~Rect() noexcept = default;
public:
- inline Rect& operator=(const Rect& _other) noexcept;
- inline Rect& operator=(Rect&& _other) noexcept;
+ Rect& operator=(const Rect& _other) noexcept;
+ Rect& operator=(Rect&& _other) noexcept;
public:
- inline Vector position() const noexcept;
- inline Size2d extent() const noexcept;
- inline size_t width() const noexcept;
- inline size_t& width() noexcept;
- inline size_t height() const noexcept;
- inline size_t& height() noexcept;
+ Vector position() const noexcept;
+ Size2d extent() const noexcept;
+ size_t width() const noexcept;
+ size_t& width() noexcept;
+ size_t height() const noexcept;
+ size_t& height() noexcept;
};
class LITEFX_MATH_API RectI : public Vector {
@@ -911,16 +911,16 @@ namespace LiteFX::Math {
//virtual ~RectI() noexcept = default;
public:
- inline RectI& operator=(const RectI& _other) noexcept;
- inline RectI& operator=(RectI&& _other) noexcept;
+ RectI& operator=(const RectI& _other) noexcept;
+ RectI& operator=(RectI&& _other) noexcept;
public:
- inline Vector position() const noexcept;
- inline Size2d extent() const noexcept;
- inline Int32 width() const noexcept;
- inline Int32& width() noexcept;
- inline Int32 height() const noexcept;
- inline Int32& height() noexcept;
+ Vector position() const noexcept;
+ Size2d extent() const noexcept;
+ Int32 width() const noexcept;
+ Int32& width() noexcept;
+ Int32 height() const noexcept;
+ Int32& height() noexcept;
};
class LITEFX_MATH_API RectF : public Vector {
@@ -933,16 +933,16 @@ namespace LiteFX::Math {
//virtual ~RectF() noexcept = default;
public:
- inline RectF& operator=(const RectF& _other) noexcept;
- inline RectF& operator=(RectF&& _other) noexcept;
+ RectF& operator=(const RectF& _other) noexcept;
+ RectF& operator=(RectF&& _other) noexcept;
public:
- inline Vector position() const noexcept;
- inline Size2d extent() const noexcept;
- inline Float width() const noexcept;
- inline Float& width() noexcept;
- inline Float height() const noexcept;
- inline Float& height() noexcept;
+ Vector position() const noexcept;
+ Size2d extent() const noexcept;
+ Float width() const noexcept;
+ Float& width() noexcept;
+ Float height() const noexcept;
+ Float& height() noexcept;
};
#pragma endregion
}
\ No newline at end of file
diff --git a/src/Math/include/litefx/matrix.hpp b/src/Math/include/litefx/matrix.hpp
index 62764a8da..d543ef1e7 100644
--- a/src/Math/include/litefx/matrix.hpp
+++ b/src/Math/include/litefx/matrix.hpp
@@ -72,13 +72,13 @@ namespace LiteFX::Math {
///
/// Initializes an empty matrix.
///
- constexpr inline Matrix() noexcept = default;
+ constexpr Matrix() noexcept = default;
///
/// Initializes a matrix where all elements take the value provided by .
///
/// The value to initialize all elements of the matrix with.
- constexpr inline Matrix(T val) noexcept {
+ constexpr Matrix(T val) noexcept {
std::fill(std::begin(m_elements), std::end(m_elements), val);
}
@@ -86,7 +86,7 @@ namespace LiteFX::Math {
/// Initializes a matrix with an array of values.
///
/// The array of values to take over by the matrix.
- constexpr inline Matrix(array_type&& array) noexcept :
+ constexpr Matrix(array_type&& array) noexcept :
m_elements(std::move(array))
{
}
@@ -95,7 +95,7 @@ namespace LiteFX::Math {
/// Initializes the matrix with a set of values.
///
/// The values to initialize the matrix with.
- constexpr inline Matrix(std::initializer_list elements) noexcept {
+ constexpr Matrix(std::initializer_list elements) noexcept {
std::ranges::move(elements, std::begin(m_elements));
};
@@ -106,7 +106,7 @@ namespace LiteFX::Math {
/// The columns of the other matrix.
/// The other matrix.
template
- constexpr inline Matrix(const Matrix& _other) noexcept {
+ constexpr Matrix(const Matrix& _other) noexcept {
for (size_t r { 0 }; r < rows && r < mat_rows; ++r)
std::ranges::copy(_other.row(r), std::begin(m_elements) + r * mat_cols);
}
@@ -115,7 +115,7 @@ namespace LiteFX::Math {
/// Initializes a matrix with the values provided by another matrix.
///
/// The other matrix to copy the values from.
- constexpr inline Matrix(const mat_type& _other) noexcept {
+ constexpr Matrix(const mat_type& _other) noexcept {
std::ranges::copy(_other.m_elements, std::begin(m_elements));
}
@@ -123,7 +123,7 @@ namespace LiteFX::Math {
/// Initializes a matrix by taking over another matrix.
///
/// The matrix to take over.
- constexpr inline Matrix(mat_type&& _other) noexcept {
+ constexpr Matrix(mat_type&& _other) noexcept {
m_elements = std::move(_other.m_elements);
}
@@ -134,7 +134,7 @@ namespace LiteFX::Math {
///
/// The matrix to copy the elements from.
/// A reference to the current matrix instance.
- constexpr inline auto& operator=(const mat_type& _other) noexcept {
+ constexpr auto& operator=(const mat_type& _other) noexcept {
std::ranges::copy(_other.m_elements, std::begin(m_elements));
return *this;
}
@@ -144,7 +144,7 @@ namespace LiteFX::Math {
///
/// The matrix to take over.
/// A reference to the current matrix instance.
- constexpr inline auto& operator=(mat_type&& _other) noexcept {
+ constexpr auto& operator=(mat_type&& _other) noexcept {
m_elements = std::move(_other.m_elements);
return *this;
}
@@ -153,7 +153,7 @@ namespace LiteFX::Math {
/// Returns an identity matrix.
///
/// An identity matrix instance.
- constexpr inline static mat_type identity() noexcept {
+ constexpr static mat_type identity() noexcept {
std::array data { };
for (int i = 0; i < mat_rows && i < mat_cols; ++i)
@@ -167,7 +167,7 @@ namespace LiteFX::Math {
/// Returns a pointer to the raw data of the matrix.
///
/// A pointer to the raw data of the matrix.
- constexpr inline const scalar_type* elements() const noexcept {
+ constexpr const scalar_type* elements() const noexcept {
return m_elements.data();
}
@@ -175,7 +175,7 @@ namespace LiteFX::Math {
/// Returns a pointer to the raw data of the matrix.
///
/// A pointer to the raw data of the matrix.
- constexpr inline scalar_type* elements() noexcept {
+ constexpr scalar_type* elements() noexcept {
return m_elements.data();
}
@@ -183,7 +183,7 @@ namespace LiteFX::Math {
/// Returns the number of elements of the matrix.
///
/// The number of elements of the matrix.
- consteval inline size_t size() const noexcept {
+ consteval size_t size() const noexcept {
return mat_rows * mat_cols;
}
@@ -191,7 +191,7 @@ namespace LiteFX::Math {
/// Returns an iterator for that addresses the begin of the matrix elements.
///
/// An iterator for that addresses the begin of the matrix elements.
- constexpr inline auto begin() noexcept {
+ constexpr auto begin() noexcept {
return m_elements.begin();
}
@@ -199,7 +199,7 @@ namespace LiteFX::Math {
/// Returns an iterator for that addresses the end of the matrix elements.
///
/// An iterator for that addresses the end of the matrix elements.
- constexpr inline auto end() noexcept {
+ constexpr auto end() noexcept {
return m_elements.end();
}
@@ -207,7 +207,7 @@ namespace LiteFX::Math {
/// Returns a constant iterator for that addresses the begin of the matrix elements.
///
/// A constant iterator for that addresses the begin of the matrix elements.
- constexpr inline auto cbegin() const noexcept {
+ constexpr auto cbegin() const noexcept {
return m_elements.cbegin();
}
@@ -215,7 +215,7 @@ namespace LiteFX::Math {
/// Returns a constant iterator for that addresses the end of the matrix elements.
///
/// A constant iterator for that addresses the end of the matrix elements.
- constexpr inline auto cend() const noexcept {
+ constexpr auto cend() const noexcept {
return m_elements.cend();
}
@@ -225,7 +225,7 @@ namespace LiteFX::Math {
/// The row of the element.
/// The column of the element.
/// The scalar value at the provided row and column.
- constexpr inline scalar_type at(size_t row, size_t col) const noexcept {
+ constexpr scalar_type at(size_t row, size_t col) const noexcept {
assert(row < mat_rows && col < mat_cols);
return m_elements[row * mat_cols + col];
@@ -237,7 +237,7 @@ namespace LiteFX::Math {
/// The row of the element.
/// The column of the element.
/// A reference of the scalar value at the provided row and column.
- constexpr inline scalar_type& at(size_t row, size_t col) noexcept {
+ constexpr scalar_type& at(size_t row, size_t col) noexcept {
assert(row < mat_rows && col < mat_cols);
return m_elements[row * mat_cols + col];
@@ -248,7 +248,7 @@ namespace LiteFX::Math {
///
/// The index of the row to view.
/// A view over the specified matrix row.
- constexpr inline std::span row(size_t row) const noexcept {
+ constexpr std::span row(size_t row) const noexcept {
assert(row < mat_rows);
return std::span(m_elements.begin() + row * mat_cols, mat_cols);
@@ -259,7 +259,7 @@ namespace LiteFX::Math {
///
/// The index of the row to view.
/// A view over the specified matrix row.
- constexpr inline std::span row(size_t row) noexcept {
+ constexpr std::span row(size_t row) noexcept {
assert(row < mat_rows);
return std::span(m_elements.begin() + row * mat_cols, mat_cols);
@@ -274,7 +274,7 @@ namespace LiteFX::Math {
///
/// The index of the column of the matrix.
/// An array containing a copy of the specified column.
- constexpr inline std::array column(size_t col) const noexcept {
+ constexpr std::array column(size_t col) const noexcept {
assert(col <= mat_cols);
return m_elements | std::views::drop(col) | std::views::stride(mat_cols) | std::ranges::to>();
@@ -287,7 +287,7 @@ namespace LiteFX::Math {
/// The row of the element.
/// The column of the element.
/// The scalar value at the provided row and column.
- constexpr inline scalar_type operator[](size_t row, size_t col) const noexcept {
+ constexpr scalar_type operator[](size_t row, size_t col) const noexcept {
return this->at(row, col);
}
@@ -297,7 +297,7 @@ namespace LiteFX::Math {
/// The row of the element.
/// The column of the element.
/// A reference of the scalar value at the provided row and column.
- constexpr inline scalar_type& operator[](size_t row, size_t col) noexcept {
+ constexpr scalar_type& operator[](size_t row, size_t col) noexcept {
return this->at(row, col);
}
#endif
@@ -307,7 +307,7 @@ namespace LiteFX::Math {
///
/// The row and column position of the matrix element.
/// The scalar value at the provided position.
- constexpr inline scalar_type operator[](std::pair position) const noexcept {
+ constexpr scalar_type operator[](std::pair position) const noexcept {
return this->at(position.first, position.second);
}
@@ -316,7 +316,7 @@ namespace LiteFX::Math {
///
/// The row and column position of the matrix element.
/// A reference of the scalar value at the provided position.
- constexpr inline scalar_type& operator[](std::pair position) noexcept {
+ constexpr scalar_type& operator[](std::pair position) noexcept {
return this->at(position.first, position.second);
}
@@ -324,14 +324,14 @@ namespace LiteFX::Math {
///
/// Converts the matrix into a multi-dimensional view over the elements.
///
- constexpr inline operator std::mdspan>() const noexcept {
+ constexpr operator std::mdspan>() const noexcept {
return std::mdspan>(m_elements.data());
}
///
/// Converts the matrix into a multi-dimensional view over the elements.
///
- constexpr inline operator std::mdspan>() noexcept {
+ constexpr operator std::mdspan>() noexcept {
return std::mdspan>(m_elements.data());
}
#endif
@@ -339,28 +339,28 @@ namespace LiteFX::Math {
///
/// Converts the matrix to an instance of `std::array`.
///
- constexpr inline operator std::array() const noexcept {
+ constexpr operator std::array() const noexcept {
return m_elements;
}
///
/// Converts the matrix into an instance of type `std::vector`.
///
- constexpr inline operator std::vector() const noexcept {
+ constexpr operator std::vector() const noexcept {
return std::vector(std::begin(m_elements), std::end(m_elements));
}
///
/// Converts the matrix into a linear view over the elements.
///
- constexpr inline operator std::span() const noexcept {
+ constexpr operator std::span() const noexcept {
return std::span(m_elements.data(), m_elements.size());
}
///
/// Converts the matrix into a linear view over the elements.
///
- constexpr inline operator std::span() noexcept {
+ constexpr operator std::span() noexcept {
return std::span(m_elements.data(), m_elements.size());
}
@@ -372,7 +372,7 @@ namespace LiteFX::Math {
/// matrix into a column-major one.
///
/// A copy of the matrix where the elements are transposed.
- constexpr inline generic_mat_type transpose() const noexcept {
+ constexpr generic_mat_type transpose() const noexcept {
std::array data { };
for (int r{ 0 }; r < mat_rows; ++r)
@@ -390,7 +390,7 @@ namespace LiteFX::Math {
/// Returns whether or not the matrix is symmetric, that is the number of rows and columns are equal.
///
/// `true`, if the matrix is symmetric and `false` otherwise.
- consteval inline bool symmetric() const noexcept {
+ consteval bool symmetric() const noexcept {
return ROWS == COLS;
}
@@ -401,7 +401,7 @@ namespace LiteFX::Math {
/// Initializes a matrix from a glm matrix instance.
///
/// The glm matrix to initialize the matrix instance with.
- constexpr inline Matrix(const glm::mat& mat) noexcept {
+ constexpr Matrix(const glm::mat& mat) noexcept {
for (int r { 0 }; r < mat_rows; ++r)
for (int c { 0 }; c < mat_cols; ++c)
m_elements[r * mat_cols + c] = mat[c][r];
@@ -411,7 +411,7 @@ namespace LiteFX::Math {
/// Initializes a matrix from a glm matrix instance.
///
/// The glm matrix to initialize the matrix instance with.
- constexpr inline Matrix(glm::mat&& mat) noexcept {
+ constexpr Matrix(glm::mat&& mat) noexcept {
for (int r { 0 }; r < mat_rows; ++r)
for (int c { 0 }; c < mat_cols; ++c)
m_elements[r * mat_cols + c] = std::move(mat[c][r]);
@@ -422,7 +422,7 @@ namespace LiteFX::Math {
///
/// The glm matrix instance.
template
- constexpr inline operator glm::mat() const noexcept requires (mat_rows >= rows && mat_cols >= cols) {
+ constexpr operator glm::mat() const noexcept requires (mat_rows >= rows && mat_cols >= cols) {
std::array data;
glm::mat mat;
@@ -438,7 +438,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 2x2 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<2, 2, scalar_type>() const noexcept requires (mat_rows >= 2 && mat_cols >= 2) {
+ constexpr operator glm::mat<2, 2, scalar_type>() const noexcept requires (mat_rows >= 2 && mat_cols >= 2) {
return glm::mat<2, 2, scalar_type>(at(0, 0), at(1, 0), at(0, 1), at(1, 1));
}
@@ -446,7 +446,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 3x2 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<2, 3, scalar_type>() const noexcept requires (mat_rows >= 3 && mat_cols >= 2) {
+ constexpr operator glm::mat<2, 3, scalar_type>() const noexcept requires (mat_rows >= 3 && mat_cols >= 2) {
return glm::mat<2, 3, scalar_type>(at(0, 0), at(1, 0), at(2, 0), at(0, 1), at(1, 1), at(2, 1));
}
@@ -454,7 +454,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 4x2 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<2, 4, scalar_type>() const noexcept requires (mat_rows >= 4 && mat_cols >= 2) {
+ constexpr operator glm::mat<2, 4, scalar_type>() const noexcept requires (mat_rows >= 4 && mat_cols >= 2) {
return glm::mat<2, 4, scalar_type>(at(0, 0), at(1, 0), at(2, 0), at(3, 0), at(0, 1), at(1, 1), at(2, 1), at(3, 1));
}
@@ -462,7 +462,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 2x3 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<3, 2, scalar_type>() const noexcept requires (mat_rows >= 2 && mat_cols >= 3) {
+ constexpr operator glm::mat<3, 2, scalar_type>() const noexcept requires (mat_rows >= 2 && mat_cols >= 3) {
return glm::mat<3, 2, scalar_type>(at(0, 0), at(1, 0), at(0, 1), at(1, 1), at(0, 2), at(1, 2));
}
@@ -470,7 +470,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 2x4 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<4, 2, scalar_type>() const noexcept requires (mat_rows >= 2 && mat_cols >= 4) {
+ constexpr operator glm::mat<4, 2, scalar_type>() const noexcept requires (mat_rows >= 2 && mat_cols >= 4) {
return glm::mat<4, 2, scalar_type>(at(0, 0), at(1, 0), at(0, 1), at(1, 1), at(0, 2), at(1, 2), at(0, 3), at(1, 3));
}
@@ -478,7 +478,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 3x3 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<3, 3, scalar_type>() const noexcept requires (mat_rows >= 3 && mat_cols >= 3) {
+ constexpr operator glm::mat<3, 3, scalar_type>() const noexcept requires (mat_rows >= 3 && mat_cols >= 3) {
return glm::mat<3, 3, scalar_type>(at(0, 0), at(1, 0), at(2, 0), at(0, 1), at(1, 1), at(2, 1), at(0, 2), at(1, 2), at(2, 2));
}
@@ -486,7 +486,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 4x3 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<3, 4, scalar_type>() const noexcept requires (mat_rows >= 4 && mat_cols >= 3) {
+ constexpr operator glm::mat<3, 4, scalar_type>() const noexcept requires (mat_rows >= 4 && mat_cols >= 3) {
return glm::mat<3, 4, scalar_type>(at(0, 0), at(1, 0), at(2, 0), at(3, 0), at(0, 1), at(1, 1), at(2, 1), at(3, 1), at(0, 2), at(1, 2), at(2, 2), at(3, 2));
}
@@ -494,7 +494,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 3x4 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<4, 3, scalar_type>() const noexcept requires (mat_rows >= 3 && mat_cols >= 4) {
+ constexpr operator glm::mat<4, 3, scalar_type>() const noexcept requires (mat_rows >= 3 && mat_cols >= 4) {
return glm::mat<4, 3, scalar_type>(at(0, 0), at(1, 0), at(2, 0), at(0, 1), at(1, 1), at(2, 1), at(0, 2), at(1, 2), at(2, 2), at(0, 3), at(1, 3), at(2, 3));
}
@@ -502,7 +502,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 4x4 glm matrix.
///
/// The glm matrix instance.
- constexpr inline operator glm::mat<4, 4, scalar_type>() const noexcept requires (mat_rows >= 4 && mat_cols >= 4) {
+ constexpr operator glm::mat<4, 4, scalar_type>() const noexcept requires (mat_rows >= 4 && mat_cols >= 4) {
return glm::mat<4, 4, scalar_type>(at(0, 0), at(1, 0), at(2, 0), at(3, 0), at(0, 1), at(1, 1), at(2, 1), at(3, 1), at(0, 2), at(1, 2), at(2, 2), at(3, 2), at(0, 3), at(1, 3), at(2, 3), at(3, 3));
}
#endif // LITEFX_BUILD_WITH_GLM
@@ -513,7 +513,7 @@ namespace LiteFX::Math {
/// Initializes a matrix from a DirectX matrix instance.
///
/// The DirectX matrix to initialize the matrix instance with.
- constexpr inline Matrix(const DirectX::XMFLOAT3X3& mat) noexcept {
+ constexpr Matrix(const DirectX::XMFLOAT3X3& mat) noexcept {
for (int r { 0 }; r < 3; ++r)
for (int c { 0 }; c < 3; ++c)
at(r, c) = mat(r, c);
@@ -523,7 +523,7 @@ namespace LiteFX::Math {
/// Initializes a matrix from a DirectX matrix instance.
///
/// The DirectX matrix to initialize the matrix instance with.
- constexpr inline Matrix(const DirectX::XMFLOAT4X3& mat) noexcept {
+ constexpr Matrix(const DirectX::XMFLOAT4X3& mat) noexcept {
for (int r { 0 }; r < 4; ++r)
for (int c { 0 }; c < 3; ++c)
at(r, c) = mat(r, c);
@@ -533,7 +533,7 @@ namespace LiteFX::Math {
/// Initializes a matrix from a DirectX matrix instance.
///
/// The DirectX matrix to initialize the matrix instance with.
- constexpr inline Matrix(const DirectX::XMFLOAT3X4& mat) noexcept {
+ constexpr Matrix(const DirectX::XMFLOAT3X4& mat) noexcept {
for (int r { 0 }; r < 3; ++r)
for (int c { 0 }; c < 4; ++c)
at(r, c) = mat(r, c);
@@ -543,7 +543,7 @@ namespace LiteFX::Math {
/// Initializes a matrix from a DirectX matrix instance.
///
/// The DirectX matrix to initialize the matrix instance with.
- constexpr inline Matrix(const DirectX::XMFLOAT4X4& mat) noexcept {
+ constexpr Matrix(const DirectX::XMFLOAT4X4& mat) noexcept {
for (int r { 0 }; r < 4; ++r)
for (int c { 0 }; c < 4; ++c)
at(r, c) = mat(r, c);
@@ -553,7 +553,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a DirectX matrix.
///
/// The DirectX matrix instance.
- constexpr inline operator DirectX::XMMATRIX() const noexcept requires ((mat_rows == 3 || mat_rows == 4) && (mat_cols == 3 || mat_cols == 4) && std::convertible_to) {
+ constexpr operator DirectX::XMMATRIX() const noexcept requires ((mat_rows == 3 || mat_rows == 4) && (mat_cols == 3 || mat_cols == 4) && std::convertible_to) {
if constexpr (mat_rows == 3 && mat_cols == 3)
{
DirectX::XMFLOAT3X3 mat = static_cast(*this);
@@ -582,7 +582,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 3x3 DirectX matrix.
///
/// The DirectX matrix instance.
- constexpr inline operator DirectX::XMFLOAT3X3() const noexcept requires (mat_rows >= 3 && mat_cols >= 3 && std::convertible_to) {
+ constexpr operator DirectX::XMFLOAT3X3() const noexcept requires (mat_rows >= 3 && mat_cols >= 3 && std::convertible_to) {
return DirectX::XMFLOAT3X3(at(0, 0), at(0, 1), at(0, 2), at(1, 0), at(1, 2), at(2, 0), at(2, 1), at(2, 2));
}
@@ -590,7 +590,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 4x3 DirectX matrix.
///
/// The DirectX matrix instance.
- constexpr inline operator DirectX::XMFLOAT4X3() const noexcept requires (mat_rows >= 4 && mat_cols >= 3 && std::convertible_to) {
+ constexpr operator DirectX::XMFLOAT4X3() const noexcept requires (mat_rows >= 4 && mat_cols >= 3 && std::convertible_to) {
return DirectX::XMFLOAT4X3(at(0, 0), at(0, 1), at(0, 2), at(1, 0), at(1, 2), at(2, 0), at(2, 1), at(2, 2), at(3, 0), at(3, 1), at(3, 2));
}
@@ -598,7 +598,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 3x4 DirectX matrix.
///
/// The DirectX matrix instance.
- constexpr inline operator DirectX::XMFLOAT3X4() const noexcept requires (mat_rows >= 3 && mat_cols >= 4 && std::convertible_to) {
+ constexpr operator DirectX::XMFLOAT3X4() const noexcept requires (mat_rows >= 3 && mat_cols >= 4 && std::convertible_to) {
return DirectX::XMFLOAT3X4(at(0, 0), at(0, 1), at(0, 2), at(0, 3), at(1, 0), at(1, 2), at(1, 3), at(2, 0), at(2, 1), at(2, 2), at(2, 3));
}
@@ -606,7 +606,7 @@ namespace LiteFX::Math {
/// Converts the matrix into a 4x4 DirectX matrix.
///
/// The DirectX matrix instance.
- constexpr inline operator DirectX::XMFLOAT4X4() const noexcept requires (mat_rows >= 4 && mat_cols >= 4 && std::convertible_to) {
+ constexpr operator DirectX::XMFLOAT4X4() const noexcept requires (mat_rows >= 4 && mat_cols >= 4 && std::convertible_to) {
return DirectX::XMFLOAT4X4(at(0, 0), at(0, 1), at(0, 2), at(0, 3), at(1, 0), at(1, 2), at(1, 3), at(2, 0), at(2, 1), at(2, 2), at(2, 3), at(3, 0), at(3, 1), at(3, 2), at(3, 3));
}
#endif // LITEFX_BUILD_WITH_DIRECTX_MATH
diff --git a/src/Math/include/litefx/vector.hpp b/src/Math/include/litefx/vector.hpp
index 8ea19e940..d47012168 100644
--- a/src/Math/include/litefx/vector.hpp
+++ b/src/Math/include/litefx/vector.hpp
@@ -39,13 +39,13 @@ namespace LiteFX::Math {
///
/// Initializes an empty vector.
///
- constexpr inline Vector() noexcept = default;
+ constexpr Vector() noexcept = default;
///
/// Initializes a vector where all elements take the value provided by .
///
/// The value to initialize all elements of the vector with.
- constexpr inline Vector(T val) noexcept {
+ constexpr Vector(T val) noexcept {
std::fill(std::begin(m_elements), std::end(m_elements), val);
}
@@ -53,7 +53,7 @@ namespace LiteFX::Math {
/// Initializes a vector with the values provided by another vector.
///
/// The other vector to copy the values from.
- constexpr inline Vector(const vec_type& _other) noexcept {
+ constexpr Vector(const vec_type& _other) noexcept {
std::ranges::copy(_other.m_elements, std::begin(m_elements));
}
@@ -61,7 +61,7 @@ namespace LiteFX::Math {
/// Initializes a vector by taking over another vector.
///
/// The vector to take over.
- constexpr inline Vector(vec_type&& _other) noexcept {
+ constexpr Vector(vec_type&& _other) noexcept {
m_elements = std::move(_other.m_elements);
}
@@ -72,7 +72,7 @@ namespace LiteFX::Math {
///
/// The value to initialize the x-component of the vector with.
/// The value to initialize the y-component of the vector with.
- constexpr inline Vector(T x, T y) noexcept requires(DIM == 2) {
+ constexpr Vector(T x, T y) noexcept requires(DIM == 2) {
m_elements[0] = x;
m_elements[1] = y;
};
@@ -83,7 +83,7 @@ namespace LiteFX::Math {
/// The value to initialize the x-component of the vector with.
/// The value to initialize the y-component of the vector with.
/// The value to initialize the z-component of the vector with.
- constexpr inline Vector(T x, T y, T z) noexcept requires(DIM == 3) {
+ constexpr Vector(T x, T y, T z) noexcept requires(DIM == 3) {
m_elements[0] = x;
m_elements[1] = y;
m_elements[2] = z;
@@ -96,7 +96,7 @@ namespace LiteFX::Math {
/// The value to initialize the y-component of the vector with.
/// The value to initialize the z-component of the vector with.
/// The value to initialize the w-component of the vector with.
- constexpr inline Vector(T x, T y, T z, T w) noexcept requires(DIM == 4) {
+ constexpr Vector(T x, T y, T z, T w) noexcept requires(DIM == 4) {
m_elements[0] = x;
m_elements[1] = y;
m_elements[2] = z;
@@ -107,7 +107,7 @@ namespace LiteFX::Math {
/// Initializes the vector from an arbitrary input range.
///
/// The range to initialize the vector with.
- constexpr inline explicit Vector(std::ranges::input_range auto&& input) noexcept requires
+ constexpr explicit Vector(std::ranges::input_range auto&& input) noexcept requires
std::is_nothrow_convertible_v, T>
{
std::ranges::copy(input, std::begin(m_elements));
@@ -118,7 +118,7 @@ namespace LiteFX::Math {
///
/// The vector to copy the elements from.
/// A reference to the current vector instance.
- constexpr inline auto& operator=(const vec_type& _other) noexcept {
+ constexpr auto& operator=(const vec_type& _other) noexcept {
std::ranges::copy(_other.m_elements, std::begin(m_elements));
return *this;
}
@@ -128,7 +128,7 @@ namespace LiteFX::Math {
///
/// The vector to take over.
/// A reference to the current vector instance.
- constexpr inline auto& operator=(vec_type&& _other) noexcept {
+ constexpr auto& operator=(vec_type&& _other) noexcept {
m_elements = std::move(_other.m_elements);
return *this;
}
@@ -138,7 +138,7 @@ namespace LiteFX::Math {
///
/// The input range to copy the values from.
/// A reference to the current vector instance.
- constexpr inline auto& operator=(std::ranges::input_range auto&& input) noexcept requires
+ constexpr auto& operator=(std::ranges::input_range auto&& input) noexcept requires
std::is_nothrow_convertible_v, T>
{
std::ranges::copy(input, std::begin(m_elements));
@@ -154,7 +154,7 @@ namespace LiteFX::Math {
///
/// The index of the element to return.
/// The value of the element at the provided index.
- constexpr inline T operator[](unsigned int i) const noexcept {
+ constexpr T operator[](unsigned int i) const noexcept {
assert(i < DIM);
return m_elements[i % DIM];
@@ -168,7 +168,7 @@ namespace LiteFX::Math {
///
/// The index of the element to return.
/// A reference to a value of the element at the provided index.
- constexpr inline T& operator[](unsigned int i) noexcept {
+ constexpr T& operator[](unsigned int i) noexcept {
assert(i < DIM);
return m_elements[i % DIM];
@@ -178,7 +178,7 @@ namespace LiteFX::Math {
/// Returns an interator for that addresses the begin of the vector elements.
///
/// An interator for that addresses the begin of the vector elements.
- constexpr inline auto begin() noexcept {
+ constexpr auto begin() noexcept {
return m_elements.begin();
}
@@ -186,7 +186,7 @@ namespace LiteFX::Math {
/// Returns an interator for that addresses the end of the vector elements.
///
/// An interator for that addresses the end of the vector elements.
- constexpr inline auto end() noexcept {
+ constexpr auto end() noexcept {
return m_elements.end();
}
@@ -194,7 +194,7 @@ namespace LiteFX::Math {
/// Returns a constant interator for that addresses the begin of the vector elements.
///
/// A constant interator for that addresses the begin of the vector elements.
- constexpr inline auto cbegin() const noexcept {
+ constexpr auto cbegin() const noexcept {
return m_elements.cbegin();
}
@@ -202,7 +202,7 @@ namespace LiteFX::Math {
/// Returns a constant interator for that addresses the end of the vector elements.
///
/// A constant interator for that addresses the end of the vector elements.
- constexpr inline auto cend() const noexcept {
+ constexpr auto cend() const noexcept {
return m_elements.cend();
}
@@ -211,21 +211,21 @@ namespace LiteFX::Math {
/// Returns a pointer to the elements of the vector.
///
/// A pointer to the elements of the vector.
- constexpr inline const scalar_type* elements() const noexcept {
+ constexpr const scalar_type* elements() const noexcept {
return m_elements.data();
}
///
/// Converts the vector to an instance of `std::array`.
///
- constexpr inline operator std::array() const noexcept {
+ constexpr operator std::array() const noexcept {
return m_elements;
}
///
/// Converts the vector into an instance of type `std::vector`.
///
- constexpr inline operator std::vector() const noexcept {
+ constexpr operator std::vector() const noexcept {
return std::vector(std::begin(m_elements), std::end(m_elements));
}
@@ -233,7 +233,7 @@ namespace LiteFX::Math {
/// Returns the number of dimensions of the vector.
///
/// The number of dimensions of the vector.
- constexpr inline int size() const noexcept {
+ constexpr int size() const noexcept {
return vec_size;
}
@@ -241,7 +241,7 @@ namespace LiteFX::Math {
/// Returns the value of the x component of the vector.
///
/// The value of the x component of the vector.
- constexpr inline scalar_type x() const noexcept requires (DIM > 0) {
+ constexpr scalar_type x() const noexcept requires (DIM > 0) {
return m_elements[0];
}
@@ -249,7 +249,7 @@ namespace LiteFX::Math {
/// Returns a reference of the value of the x component of the vector.
///
/// The a reference of the value of the x component of the vector.
- constexpr inline scalar_type& x() noexcept requires (DIM > 0) {
+ constexpr scalar_type& x() noexcept requires (DIM > 0) {
return m_elements[0];
}
@@ -257,7 +257,7 @@ namespace LiteFX::Math {
/// Returns the value of the y component of the vector.
///
/// The value of the y component of the vector.
- constexpr inline scalar_type y() const noexcept requires (DIM > 1) {
+ constexpr scalar_type y() const noexcept requires (DIM > 1) {
return m_elements[1];
}
@@ -265,7 +265,7 @@ namespace LiteFX::Math {
/// Returns a reference of the value of the y component of the vector.
///
/// The a reference of the value of the y component of the vector.
- constexpr inline scalar_type& y() noexcept requires (DIM > 1) {
+ constexpr scalar_type& y() noexcept requires (DIM > 1) {
return m_elements[1];
}
@@ -273,7 +273,7 @@ namespace LiteFX::Math {
/// Returns the value of the z component of the vector.
///
/// The value of the z component of the vector.
- constexpr inline scalar_type z() const noexcept requires (DIM > 2) {
+ constexpr scalar_type z() const noexcept requires (DIM > 2) {
return m_elements[2];
}
@@ -281,7 +281,7 @@ namespace LiteFX::Math {
/// Returns a reference of the value of the z component of the vector.
///
/// The a reference of the value of the z component of the vector.
- constexpr inline scalar_type& z() noexcept requires (DIM > 2) {
+ constexpr scalar_type& z() noexcept requires (DIM > 2) {
return m_elements[2];
}
@@ -289,7 +289,7 @@ namespace LiteFX::Math {
/// Returns the value of the w component of the vector.
///
/// The value of the w component of the vector.
- constexpr inline scalar_type w() const noexcept requires (DIM > 3) {
+ constexpr scalar_type w() const noexcept requires (DIM > 3) {
return m_elements[3];
}
@@ -297,7 +297,7 @@ namespace LiteFX::Math {
/// Returns a reference of the value of the w component of the vector.
///
/// The a reference of the value of the w component of the vector.
- constexpr inline scalar_type& w() noexcept requires (DIM > 3) {
+ constexpr scalar_type& w() noexcept requires (DIM > 3) {
return m_elements[3];
}
};
diff --git a/src/Modules/overlay-ports/dx-agility-sdk/d3d12agility.hpp.in b/src/Modules/overlay-ports/directx-agility-sdk/d3d12agility.hpp.in
similarity index 100%
rename from src/Modules/overlay-ports/dx-agility-sdk/d3d12agility.hpp.in
rename to src/Modules/overlay-ports/directx-agility-sdk/d3d12agility.hpp.in
diff --git a/src/Modules/overlay-ports/dx-agility-sdk/dxagilitysdk-config.cmake.in b/src/Modules/overlay-ports/directx-agility-sdk/dxagilitysdk-config.cmake.in
similarity index 100%
rename from src/Modules/overlay-ports/dx-agility-sdk/dxagilitysdk-config.cmake.in
rename to src/Modules/overlay-ports/directx-agility-sdk/dxagilitysdk-config.cmake.in
diff --git a/src/Modules/overlay-ports/dx-agility-sdk/portfile.cmake b/src/Modules/overlay-ports/directx-agility-sdk/portfile.cmake
similarity index 100%
rename from src/Modules/overlay-ports/dx-agility-sdk/portfile.cmake
rename to src/Modules/overlay-ports/directx-agility-sdk/portfile.cmake
diff --git a/src/Modules/overlay-ports/dx-agility-sdk/vcpkg.json b/src/Modules/overlay-ports/directx-agility-sdk/vcpkg.json
similarity index 100%
rename from src/Modules/overlay-ports/dx-agility-sdk/vcpkg.json
rename to src/Modules/overlay-ports/directx-agility-sdk/vcpkg.json
diff --git a/src/Modules/overlay-triplets/x64-windows-rel.cmake b/src/Modules/overlay-triplets/x64-windows-rel.cmake
new file mode 100644
index 000000000..31f88b23d
--- /dev/null
+++ b/src/Modules/overlay-triplets/x64-windows-rel.cmake
@@ -0,0 +1,4 @@
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE dynamic)
+set(VCPKG_BUILD_TYPE release)
\ No newline at end of file
diff --git a/src/Modules/overlay-triplets/x64-windows-static-rel.cmake b/src/Modules/overlay-triplets/x64-windows-static-rel.cmake
new file mode 100644
index 000000000..15a96d48e
--- /dev/null
+++ b/src/Modules/overlay-triplets/x64-windows-static-rel.cmake
@@ -0,0 +1,8 @@
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE static)
+set(VCPKG_BUILD_TYPE release)
+
+if(${PORT} MATCHES "winpixeventruntime|directx-agility-sdk")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
\ No newline at end of file
diff --git a/src/Modules/overlay-triplets/x64-windows-static.cmake b/src/Modules/overlay-triplets/x64-windows-static.cmake
new file mode 100644
index 000000000..9f2bd58ad
--- /dev/null
+++ b/src/Modules/overlay-triplets/x64-windows-static.cmake
@@ -0,0 +1,7 @@
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE static)
+
+if(${PORT} MATCHES "winpixeventruntime|directx-agility-sdk")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
\ No newline at end of file
diff --git a/src/Modules/overlay-triplets/x64-windows.cmake b/src/Modules/overlay-triplets/x64-windows.cmake
new file mode 100644
index 000000000..d895a949b
--- /dev/null
+++ b/src/Modules/overlay-triplets/x64-windows.cmake
@@ -0,0 +1,3 @@
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE dynamic)
\ No newline at end of file
diff --git a/src/Modules/overlay-triplets/x86-windows-rel.cmake b/src/Modules/overlay-triplets/x86-windows-rel.cmake
new file mode 100644
index 000000000..748d4f93f
--- /dev/null
+++ b/src/Modules/overlay-triplets/x86-windows-rel.cmake
@@ -0,0 +1,4 @@
+set(VCPKG_TARGET_ARCHITECTURE x86)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE dynamic)
+set(VCPKG_BUILD_TYPE release)
\ No newline at end of file
diff --git a/src/Modules/overlay-triplets/x86-windows-static-rel.cmake b/src/Modules/overlay-triplets/x86-windows-static-rel.cmake
new file mode 100644
index 000000000..169191345
--- /dev/null
+++ b/src/Modules/overlay-triplets/x86-windows-static-rel.cmake
@@ -0,0 +1,8 @@
+set(VCPKG_TARGET_ARCHITECTURE x86)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE static)
+set(VCPKG_BUILD_TYPE release)
+
+if(${PORT} MATCHES "winpixeventruntime|directx-agility-sdk")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
\ No newline at end of file
diff --git a/src/Modules/overlay-triplets/x86-windows-static.cmake b/src/Modules/overlay-triplets/x86-windows-static.cmake
new file mode 100644
index 000000000..020f51b08
--- /dev/null
+++ b/src/Modules/overlay-triplets/x86-windows-static.cmake
@@ -0,0 +1,7 @@
+set(VCPKG_TARGET_ARCHITECTURE x86)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE static)
+
+if(${PORT} MATCHES "winpixeventruntime|directx-agility-sdk")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
\ No newline at end of file
diff --git a/src/Modules/overlay-triplets/x86-windows.cmake b/src/Modules/overlay-triplets/x86-windows.cmake
new file mode 100644
index 000000000..e175deedc
--- /dev/null
+++ b/src/Modules/overlay-triplets/x86-windows.cmake
@@ -0,0 +1,3 @@
+set(VCPKG_TARGET_ARCHITECTURE x86)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE dynamic)
\ No newline at end of file
diff --git a/src/Rendering/CMakeLists.txt b/src/Rendering/CMakeLists.txt
index ceda58058..a93b21083 100644
--- a/src/Rendering/CMakeLists.txt
+++ b/src/Rendering/CMakeLists.txt
@@ -31,7 +31,7 @@ SET(RENDERING_SOURCES
)
# Add shared library project.
-ADD_LIBRARY(${PROJECT_NAME} SHARED
+ADD_LIBRARY(${PROJECT_NAME}
${RENDERING_HEADERS}
${RENDERING_SOURCES}
)
@@ -62,6 +62,11 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME}
PUBLIC LiteFX.Core LiteFX.Math LiteFX.Graphics LiteFX.AppModel LiteFX.Logging
)
+# Pre-define export specifier, to prevent dllimport/dllexport from being be emitted.
+IF(NOT BUILD_SHARED_LIBS)
+ TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PUBLIC -DLITEFX_RENDERING_API=)
+ENDIF(NOT BUILD_SHARED_LIBS)
+
# Re-use pre-compiled core header.
IF(LITEFX_BUILD_PRECOMPILED_HEADERS)
TARGET_PRECOMPILE_HEADERS(${PROJECT_NAME} REUSE_FROM LiteFX.Core)
diff --git a/src/Rendering/include/litefx/rendering.hpp b/src/Rendering/include/litefx/rendering.hpp
index 93bf84c25..e685dd52a 100644
--- a/src/Rendering/include/litefx/rendering.hpp
+++ b/src/Rendering/include/litefx/rendering.hpp
@@ -22,49 +22,49 @@ namespace LiteFX::Rendering {
using image_type = TImage;
public:
- constexpr inline virtual ~Barrier() noexcept = default;
+ constexpr virtual ~Barrier() noexcept = default;
public:
///
- constexpr inline virtual void transition(const buffer_type& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) = 0;
+ constexpr virtual void transition(const buffer_type& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) = 0;
///
- constexpr inline virtual void transition(const buffer_type& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) = 0;
+ constexpr virtual void transition(const buffer_type& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) = 0;
///
- constexpr inline virtual void transition(const image_type& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) = 0;
+ constexpr virtual void transition(const image_type& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) = 0;
///
- constexpr inline virtual void transition(const image_type& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) = 0;
+ constexpr virtual void transition(const image_type& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) = 0;
///
- constexpr inline virtual void transition(const image_type& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) = 0;
+ constexpr virtual void transition(const image_type& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) = 0;
///
- constexpr inline virtual void transition(const image_type& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) = 0;
+ constexpr virtual void transition(const image_type& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) = 0;
private:
- constexpr inline void doTransition(const IBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) override {
+ constexpr void doTransition(const IBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) override {
this->transition(dynamic_cast(buffer), accessBefore, accessAfter);
}
- constexpr inline void doTransition(const IBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) override {
+ constexpr void doTransition(const IBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) override {
this->transition(dynamic_cast(buffer), element, accessBefore, accessAfter);
}
- constexpr inline void doTransition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override {
+ constexpr void doTransition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override {
this->transition(dynamic_cast(image), accessBefore, accessAfter, layout);
}
- constexpr inline void doTransition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override {
+ constexpr void doTransition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override {
this->transition(dynamic_cast(image), accessBefore, accessAfter, fromLayout, toLayout);
}
- constexpr inline void doTransition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override {
+ constexpr void doTransition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) override {
this->transition(dynamic_cast(image), level, levels, layer, layers, plane, accessBefore, accessAfter, layout);
}
- constexpr inline void doTransition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override {
+ constexpr void doTransition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) override {
this->transition(dynamic_cast(image), level, levels, layer, layers, plane, accessBefore, accessAfter, fromLayout, toLayout);
}
};
@@ -319,7 +319,7 @@ namespace LiteFX::Rendering {
virtual Enumerable modules() const noexcept = 0;
private:
- inline virtual Enumerable getModules() const noexcept {
+ virtual inline Enumerable getModules() const noexcept {
return this->modules();
}
};
@@ -608,19 +608,19 @@ namespace LiteFX::Rendering {
virtual void drawIndexedIndirect(const buffer_type& batchBuffer, const buffer_type& countBuffer, UInt64 offset = 0, UInt64 countOffset = 0, UInt32 maxBatches = std::numeric_limits::max()) const noexcept = 0;
///
- inline virtual void draw(const vertex_buffer_type& vertexBuffer, UInt32 instances = 1, UInt32 firstVertex = 0, UInt32 firstInstance = 0) const {
+ virtual inline void draw(const vertex_buffer_type& vertexBuffer, UInt32 instances = 1, UInt32 firstVertex = 0, UInt32 firstInstance = 0) const {
this->bind(vertexBuffer);
this->draw(vertexBuffer.elements(), instances, firstVertex, firstInstance);
}
///
- inline virtual void drawIndexed(const index_buffer_type& indexBuffer, UInt32 instances = 1, UInt32 firstIndex = 0, Int32 vertexOffset = 0, UInt32 firstInstance = 0) const {
+ virtual inline void drawIndexed(const index_buffer_type& indexBuffer, UInt32 instances = 1, UInt32 firstIndex = 0, Int32 vertexOffset = 0, UInt32 firstInstance = 0) const {
this->bind(indexBuffer);
this->drawIndexed(indexBuffer.elements(), instances, firstIndex, vertexOffset, firstInstance);
}
///
- inline virtual void drawIndexed(const vertex_buffer_type& vertexBuffer, const index_buffer_type& indexBuffer, UInt32 instances = 1, UInt32 firstIndex = 0, Int32 vertexOffset = 0, UInt32 firstInstance = 0) const {
+ virtual inline void drawIndexed(const vertex_buffer_type& vertexBuffer, const index_buffer_type& indexBuffer, UInt32 instances = 1, UInt32 firstIndex = 0, Int32 vertexOffset = 0, UInt32 firstInstance = 0) const {
this->bind(vertexBuffer);
this->bind(indexBuffer);
this->drawIndexed(indexBuffer.elements(), instances, firstIndex, vertexOffset, firstInstance);
@@ -955,7 +955,7 @@ namespace LiteFX::Rendering {
virtual SharedPtr createCommandBuffer(bool beginRecording = false, bool secondary = false) const = 0;
///
- inline virtual UInt64 submit(SharedPtr commandBuffer) const {
+ virtual inline UInt64 submit(SharedPtr commandBuffer) const {
return this->submit(std::static_pointer_cast(commandBuffer));
}
@@ -963,7 +963,7 @@ namespace LiteFX::Rendering {
virtual UInt64 submit(SharedPtr commandBuffer) const = 0;
///
- inline virtual UInt64 submit(const Enumerable>& commandBuffers) const {
+ virtual inline UInt64 submit(const Enumerable>& commandBuffers) const {
return this->submit(commandBuffers | std::ranges::to>>());
}
@@ -1517,12 +1517,12 @@ namespace LiteFX::Rendering {
virtual const device_type* device(const String& name) const noexcept = 0;
///
- inline virtual const device_type* operator[](const String& name) const noexcept {
+ virtual inline const device_type* operator[](const String& name) const noexcept {
return this->device(name);
};
///
- inline virtual device_type* operator[](const String& name) noexcept {
+ virtual inline device_type* operator[](const String& name) noexcept {
return this->device(name);
};
diff --git a/src/Rendering/include/litefx/rendering_api.hpp b/src/Rendering/include/litefx/rendering_api.hpp
index f17c6ef4f..d12dae7c2 100644
--- a/src/Rendering/include/litefx/rendering_api.hpp
+++ b/src/Rendering/include/litefx/rendering_api.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include
+
#if !defined (LITEFX_RENDERING_API)
# if defined(LiteFX_Rendering_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_RENDERING_API __declspec(dllexport)
@@ -8,7 +10,7 @@
# elif !defined(LiteFX_Rendering_EXPORTS) && (defined _WIN32 || defined WINCE)
# define LITEFX_RENDERING_API __declspec(dllimport)
# endif
-#endif
+#endif
#ifndef LITEFX_RENDERING_API
# define LITEFX_RENDERING_API
@@ -1877,7 +1879,7 @@ namespace LiteFX::Rendering {
/// Returns the number of channels for a buffer format.
///
///
- constexpr inline UInt32 getBufferFormatChannels(BufferFormat format) {
+ constexpr UInt32 getBufferFormatChannels(BufferFormat format) {
return static_cast(format) & 0x000000FF;
}
@@ -1885,7 +1887,7 @@ namespace LiteFX::Rendering {
/// Returns the number of bytes used by a channel of a buffer format.
///
///
- constexpr inline UInt32 getBufferFormatChannelSize(BufferFormat format) {
+ constexpr UInt32 getBufferFormatChannelSize(BufferFormat format) {
return (static_cast(format) & 0xFF000000) >> 24;
}
@@ -1893,26 +1895,26 @@ namespace LiteFX::Rendering {
/// Returns the underlying data type of a buffer format.
///
///
- constexpr inline UInt32 getBufferFormatType(BufferFormat format) {
+ constexpr UInt32 getBufferFormatType(BufferFormat format) {
return (static_cast(format) & 0x0000FF00) >> 8;
}
///
/// Returns the size of an element of a specified format.
///
- constexpr inline size_t LITEFX_RENDERING_API getSize(Format format);
+ size_t LITEFX_RENDERING_API getSize(Format format);
///
/// Returns true, if the format contains a depth channel.
///
///
- constexpr inline bool LITEFX_RENDERING_API hasDepth(Format format);
+ bool LITEFX_RENDERING_API hasDepth(Format format);
///
/// Returns true, if the format contains a stencil channel.
///
///
- constexpr inline bool LITEFX_RENDERING_API hasStencil(Format format);
+ bool LITEFX_RENDERING_API hasStencil(Format format);
#pragma endregion
@@ -2730,14 +2732,14 @@ namespace LiteFX::Rendering {
///
/// The render target instance to copy.
/// A reference to the current render target instance.
- inline RenderTarget& operator=(const RenderTarget& _other) noexcept;
+ RenderTarget& operator=(const RenderTarget& _other) noexcept;
///
/// Assigns a render target by taking it over.
///
/// The render target to take over.
/// A reference to the current render target instance.
- inline RenderTarget& operator=(RenderTarget&& _other) noexcept;
+ RenderTarget& operator=(RenderTarget&& _other) noexcept;
public:
///
@@ -3795,7 +3797,7 @@ namespace LiteFX::Rendering {
/// The plane of the sub-resource.
/// The sub-resource ID for the sub-resource.
///
- inline virtual UInt32 subresourceId(UInt32 level, UInt32 layer, UInt32 plane) const noexcept {
+ virtual inline UInt32 subresourceId(UInt32 level, UInt32 layer, UInt32 plane) const noexcept {
return level + (layer * this->levels()) + (plane * this->levels() * this->layers());
}
@@ -3807,7 +3809,7 @@ namespace LiteFX::Rendering {
/// The array layer of the sub-resource.
/// The mip-map level of the sub-resource.
///
- inline virtual void resolveSubresource(UInt32 subresource, UInt32& plane, UInt32& layer, UInt32& level) const noexcept {
+ virtual inline void resolveSubresource(UInt32 subresource, UInt32& plane, UInt32& layer, UInt32& level) const noexcept {
const auto levels = this->levels();
const UInt32 resourcesPerPlane = levels * this->layers();
plane = subresource / resourcesPerPlane;
@@ -4582,13 +4584,13 @@ namespace LiteFX::Rendering {
/// Returns the stage that all previous commands need to reach before continuing execution.
///
/// The stage that all previous commands need to reach before continuing execution.
- constexpr inline virtual PipelineStage syncBefore() const noexcept = 0;
+ constexpr virtual PipelineStage syncBefore() const noexcept = 0;
///
/// Returns the stage all subsequent commands need to wait for before continuing execution.
///
/// The stage all subsequent commands need to wait for before continuing execution.
- constexpr inline virtual PipelineStage syncAfter() const noexcept = 0;
+ constexpr virtual PipelineStage syncAfter() const noexcept = 0;
///
/// Inserts a global barrier that waits for previous commands to finish accesses described by before subsequent commands can continue
@@ -4596,7 +4598,7 @@ namespace LiteFX::Rendering {
///
/// The access types previous commands have to finish.
/// The access types that subsequent commands continue with.
- constexpr inline virtual void wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept = 0;
+ constexpr virtual void wait(ResourceAccess accessBefore, ResourceAccess accessAfter) noexcept = 0;
///
/// Inserts a buffer barrier that blocks access to of types contained in for subsequent commands until
@@ -4605,7 +4607,7 @@ namespace LiteFX::Rendering {
/// The buffer resource to transition.
/// The access types previous commands have to finish.
/// The access types that subsequent commands continue with.
- constexpr inline void transition(const IBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) {
+ constexpr void transition(const IBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) {
this->doTransition(buffer, accessBefore, accessAfter);
};
@@ -4621,7 +4623,7 @@ namespace LiteFX::Rendering {
/// The element of the resource to transition.
/// The access types previous commands have to finish.
/// The access types that subsequent commands continue with.
- constexpr inline void transition(const IBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) {
+ constexpr void transition(const IBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) {
this->doTransition(buffer, element, accessBefore, accessAfter);
}
@@ -4634,7 +4636,7 @@ namespace LiteFX::Rendering {
/// The access types previous commands have to finish.
/// The access types that subsequent commands continue with.
/// The image layout to transition into.
- constexpr inline void transition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) {
+ constexpr void transition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) {
this->doTransition(image, accessBefore, accessAfter, layout);
}
@@ -4652,7 +4654,7 @@ namespace LiteFX::Rendering {
/// The access types previous commands have to finish.
/// The access types that subsequent commands continue with.
/// The image layout to transition into.
- constexpr inline void transition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) {
+ constexpr void transition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) {
this->doTransition(image, level, levels, layer, layers, plane, accessBefore, accessAfter, layout);
}
@@ -4670,7 +4672,7 @@ namespace LiteFX::Rendering {
/// The access types that subsequent commands continue with.
/// The image layout to transition from.
/// The image layout to transition into.
- constexpr inline void transition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) {
+ constexpr void transition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) {
this->doTransition(image, accessBefore, accessAfter, fromLayout, toLayout);
}
@@ -4693,17 +4695,17 @@ namespace LiteFX::Rendering {
/// The access types that subsequent commands continue with.
/// The image layout to transition from.
/// The image layout to transition into.
- constexpr inline void transition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) {
+ constexpr void transition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) {
this->doTransition(image, level, levels, layer, layers, plane, accessBefore, accessAfter, fromLayout, toLayout);
}
private:
- constexpr inline virtual void doTransition(const IBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) = 0;
- constexpr inline virtual void doTransition(const IBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) = 0;
- constexpr inline virtual void doTransition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) = 0;
- constexpr inline virtual void doTransition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) = 0;
- constexpr inline virtual void doTransition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) = 0;
- constexpr inline virtual void doTransition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) = 0;
+ constexpr virtual void doTransition(const IBuffer& buffer, ResourceAccess accessBefore, ResourceAccess accessAfter) = 0;
+ constexpr virtual void doTransition(const IBuffer& buffer, UInt32 element, ResourceAccess accessBefore, ResourceAccess accessAfter) = 0;
+ constexpr virtual void doTransition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) = 0;
+ constexpr virtual void doTransition(const IImage& image, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) = 0;
+ constexpr virtual void doTransition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout layout) = 0;
+ constexpr virtual void doTransition(const IImage& image, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane, ResourceAccess accessBefore, ResourceAccess accessAfter, ImageLayout fromLayout, ImageLayout toLayout) = 0;
};
///
diff --git a/src/Rendering/include/litefx/rendering_builders.hpp b/src/Rendering/include/litefx/rendering_builders.hpp
index 02d752cef..e68279ec1 100644
--- a/src/Rendering/include/litefx/rendering_builders.hpp
+++ b/src/Rendering/include/litefx/rendering_builders.hpp
@@ -36,7 +36,7 @@ namespace LiteFX::Rendering {
///
/// The parent builder instance.
/// The pipeline stage to wait for.
- constexpr inline SecondStageBuilder(TParent&& parent, PipelineStage waitFor) noexcept :
+ constexpr SecondStageBuilder(TParent&& parent, PipelineStage waitFor) noexcept :
m_parent(std::move(parent)), m_from(waitFor) { }
public:
@@ -47,7 +47,7 @@ namespace LiteFX::Rendering {
///
/// The pipeline stage that are allowed to continue after the barrier has executed.
/// The instance of the parent builder.
- constexpr inline auto toContinueWith(PipelineStage stage) -> TParent {
+ constexpr auto toContinueWith(PipelineStage stage) -> TParent {
this->m_parent.stagesCallback(this->m_from, stage);
return std::move(this->m_parent);
}
@@ -69,7 +69,7 @@ namespace LiteFX::Rendering {
///
/// The parent builder instance.
/// The resource access state of all resources to wait for with this barrier.
- constexpr inline GlobalBarrierBuilder(TParent&& parent, ResourceAccess access) noexcept :
+ constexpr GlobalBarrierBuilder(TParent&& parent, ResourceAccess access) noexcept :
m_parent(std::move(parent)), m_access(access) { }
public:
@@ -79,7 +79,7 @@ namespace LiteFX::Rendering {
/// Specifies the resource accesses that are waited for in a global barrier before it can be executed.
///
/// The resource accesses that are waited for until the barrier can be executed.
- constexpr inline auto untilFinishedWith(ResourceAccess access) -> TParent {
+ constexpr auto untilFinishedWith(ResourceAccess access) -> TParent {
this->m_parent.globalBarrierCallback(access, m_access);
return std::move(this->m_parent);
}
@@ -103,7 +103,7 @@ namespace LiteFX::Rendering {
/// The parent builder instance.
/// The buffer for this barrier.
/// The resource access state of the buffer to wait for with this barrier.
- constexpr inline BufferBarrierBuilder(TParent&& parent, IBuffer& buffer, ResourceAccess access) noexcept :
+ constexpr BufferBarrierBuilder(TParent&& parent, IBuffer& buffer, ResourceAccess access) noexcept :
m_parent(std::move(parent)), m_buffer(buffer), m_access(access) { }
public:
@@ -113,7 +113,7 @@ namespace LiteFX::Rendering {
/// Specifies the resource accesses that are waited for in a buffer before the barrier can be executed.
///
/// The resource accesses that are waited for in a buffer before the barrier can be executed.
- constexpr inline auto untilFinishedWith(ResourceAccess access) -> TParent {
+ constexpr auto untilFinishedWith(ResourceAccess access) -> TParent {
this->m_parent.bufferBarrierCallback(m_buffer, access, m_access);
return std::move(this->m_parent);
}
@@ -145,7 +145,7 @@ namespace LiteFX::Rendering {
/// The layer of the first sub-resource to transition.
/// The number of layers to transition.
/// The plane of the sub-resource to transition.
- constexpr inline ImageLayoutBarrierBuilder(TParent&& parent, IImage& image, ResourceAccess access, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) noexcept :
+ constexpr ImageLayoutBarrierBuilder(TParent&& parent, IImage& image, ResourceAccess access, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) noexcept :
m_parent(std::move(parent)), m_image(image), m_access(access), m_layout(layout), m_level(level), m_levels(levels), m_layer(layer), m_layers(layers), m_plane(plane) { }
public:
@@ -156,7 +156,7 @@ namespace LiteFX::Rendering {
/// Specifies the resource accesses that are waited for on the image sub-resources before the barrier can be executed.
///
/// The resource accesses that are waited for on the image sub-resources before the barrier can be executed.
- constexpr inline auto whenFinishedWith(ResourceAccess access) -> TParent {
+ constexpr auto whenFinishedWith(ResourceAccess access) -> TParent {
this->m_parent.imageBarrierCallback(m_image, access, m_access, m_layout, m_level, m_levels, m_layer, m_layers, m_plane);
return std::move(this->m_parent);
}
@@ -181,7 +181,7 @@ namespace LiteFX::Rendering {
/// The parent builder instance.
/// The image for this barrier.
/// The resource access state of the sub-resources in the image to wait for with this barrier.
- constexpr inline ImageBarrierBuilder(TParent&& parent, IImage& image, ResourceAccess access) noexcept :
+ constexpr ImageBarrierBuilder(TParent&& parent, IImage& image, ResourceAccess access) noexcept :
m_parent(std::move(parent)), m_image(image), m_access(access), m_level{ 0 }, m_levels{ 0 }, m_layer{ 0 }, m_layers{ 0 }, m_plane{ 0 } { }
public:
@@ -191,7 +191,7 @@ namespace LiteFX::Rendering {
/// Specifies the layout to transition an image to when executing the barrier.
///
/// The layout to transition an image to when executing the barrier.
- constexpr inline auto transitionLayout(ImageLayout layout) -> ImageLayoutBarrierBuilder {
+ constexpr auto transitionLayout(ImageLayout layout) -> ImageLayoutBarrierBuilder {
return ImageLayoutBarrierBuilder{ std::move(m_parent), m_image, m_access, layout, m_level, m_levels, m_layer, m_layers, m_plane };
}
@@ -203,7 +203,7 @@ namespace LiteFX::Rendering {
/// The base layer of the sub-resource.
/// The number of layers to block and transition.
/// The plane index of the sub-resource to block and transition.
- constexpr inline auto subresource(UInt32 level, UInt32 levels, UInt32 layer = 0, UInt32 layers = 1, UInt32 plane = 0) -> ImageBarrierBuilder& {
+ constexpr auto subresource(UInt32 level, UInt32 levels, UInt32 layer = 0, UInt32 layers = 1, UInt32 plane = 0) -> ImageBarrierBuilder& {
m_level = level;
m_levels = levels;
m_layer = layer;
@@ -220,7 +220,7 @@ namespace LiteFX::Rendering {
///
/// The pipeline stage to wait for with the barrier.
/// The pipeline stage to allow continuation with the current barrier.
- constexpr inline void stagesCallback(PipelineStage waitFor, PipelineStage continueWith) {
+ constexpr void stagesCallback(PipelineStage waitFor, PipelineStage continueWith) {
this->setupStages(waitFor, continueWith);
}
@@ -229,7 +229,7 @@ namespace LiteFX::Rendering {
///
/// The resource access state of all resources to wait for with this barrier.
/// The resource access state of all resources to continue with after this barrier.
- constexpr inline void globalBarrierCallback(ResourceAccess before, ResourceAccess after) {
+ constexpr void globalBarrierCallback(ResourceAccess before, ResourceAccess after) {
this->setupGlobalBarrier(before, after);
}
@@ -239,7 +239,7 @@ namespace LiteFX::Rendering {
/// The buffer for which the barrier blocks.
/// The resource access state of the buffer to wait for with this barrier.
/// The resource access state of the buffer to continue with after this barrier.
- constexpr inline void bufferBarrierCallback(IBuffer& buffer, ResourceAccess before, ResourceAccess after) {
+ constexpr void bufferBarrierCallback(IBuffer& buffer, ResourceAccess before, ResourceAccess after) {
this->setupBufferBarrier(buffer, before, after);
}
@@ -255,7 +255,7 @@ namespace LiteFX::Rendering {
/// The layer of the first sub-resource to transition.
/// The number of layers to transition.
/// The plane of the sub-resource to transition.
- constexpr inline void imageBarrierCallback(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) {
+ constexpr void imageBarrierCallback(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) {
this->setupImageBarrier(image, before, after, layout, level, levels, layer, layers, plane);
}
@@ -265,14 +265,14 @@ namespace LiteFX::Rendering {
///
/// The pipeline stage to wait for with the barrier.
/// The pipeline stage to allow continuation with the current barrier.
- constexpr inline virtual void setupStages(PipelineStage waitFor, PipelineStage continueWith) = 0;
+ constexpr virtual void setupStages(PipelineStage waitFor, PipelineStage continueWith) = 0;
///
/// Sets up the resource access states to wait for and to continue with the barrier to be built.
///
/// The resource access state of all resources to wait for with this barrier.
/// The resource access state of all resources to continue with after this barrier.
- constexpr inline virtual void setupGlobalBarrier(ResourceAccess before, ResourceAccess after) = 0;
+ constexpr virtual void setupGlobalBarrier(ResourceAccess before, ResourceAccess after) = 0;
///
/// Sets up the resource access states to wait for and to continue with for a specific buffer with the barrier to be built.
@@ -280,7 +280,7 @@ namespace LiteFX::Rendering {
/// The buffer for which the barrier blocks.
/// The resource access state of all resources to wait for with this barrier.
/// The resource access state of all resources to continue with after this barrier.
- constexpr inline virtual void setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after) = 0;
+ constexpr virtual void setupBufferBarrier(IBuffer& buffer, ResourceAccess before, ResourceAccess after) = 0;
///
/// Sets up the image layout transition and resource access states to wait for and continue with the barrier to be built.
@@ -294,7 +294,7 @@ namespace LiteFX::Rendering {
/// The layer of the first sub-resource to transition.
/// The number of layers to transition.
/// The plane of the sub-resource to transition.
- constexpr inline virtual void setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) = 0;
+ constexpr virtual void setupImageBarrier(IImage& image, ResourceAccess before, ResourceAccess after, ImageLayout layout, UInt32 level, UInt32 levels, UInt32 layer, UInt32 layers, UInt32 plane) = 0;
public:
using Builder::Builder;
@@ -306,7 +306,7 @@ namespace LiteFX::Rendering {
///
/// The pipeline stages to wait for before executing the barrier.
template
- constexpr inline [[nodiscard]] auto waitFor(this TSelf&& self, PipelineStage stage) -> SecondStageBuilder {
+ constexpr [[nodiscard]] auto waitFor(this TSelf&& self, PipelineStage stage) -> SecondStageBuilder {
return SecondStageBuilder{ std::move(self), stage };
}
@@ -315,7 +315,7 @@ namespace LiteFX::Rendering {
///
/// The resource accesses that are blocked until the barrier has executed.
template
- constexpr inline [[nodiscard]] auto blockAccessTo(this TSelf&& self, ResourceAccess access) -> GlobalBarrierBuilder {
+ constexpr [[nodiscard]] auto blockAccessTo(this TSelf&& self, ResourceAccess access) -> GlobalBarrierBuilder {
return GlobalBarrierBuilder{ std::move(self), access };
}
@@ -325,7 +325,7 @@ namespace LiteFX::Rendering {
/// The buffer to wait for.
/// The resource accesses that are blocked until the barrier has executed.
template
- constexpr inline [[nodiscard]] auto blockAccessTo(this TSelf&& self, IBuffer& buffer, ResourceAccess access) -> BufferBarrierBuilder {
+ constexpr [[nodiscard]] auto blockAccessTo(this TSelf&& self, IBuffer& buffer, ResourceAccess access) -> BufferBarrierBuilder {
return BufferBarrierBuilder{ std::move(self), buffer, access };
}
@@ -336,7 +336,7 @@ namespace LiteFX::Rendering {
/// The sub-resource to block.
/// The resource accesses that are blocked until the barrier has executed.
template
- constexpr inline [[nodiscard]] auto blockAccessTo(this TSelf&& self, IBuffer& buffer, UInt32 subresource, ResourceAccess access) -> BufferBarrierBuilder {
+ constexpr [[nodiscard]] auto blockAccessTo(this TSelf&& self, IBuffer& buffer, UInt32 subresource, ResourceAccess access) -> BufferBarrierBuilder {
return BufferBarrierBuilder{ std::move(self), buffer, subresource, access };
}
@@ -346,7 +346,7 @@ namespace LiteFX::Rendering {
/// The buffer to wait for.
/// The resource accesses that are blocked until the barrier has executed.
template
- constexpr inline [[nodiscard]] auto blockAccessTo(this TSelf&& self, IImage& image, ResourceAccess access) -> ImageBarrierBuilder {
+ constexpr [[nodiscard]] auto blockAccessTo(this TSelf&& self, IImage& image, ResourceAccess access) -> ImageBarrierBuilder {
return ImageBarrierBuilder{ std::move(self), image, access };
}
};
@@ -383,7 +383,7 @@ namespace LiteFX::Rendering {
/// The name of the entry point for the module.
/// The descriptor that binds shader-local data for ray-tracing shaders.
/// The shader module instance.
- constexpr inline virtual UniquePtr makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor) = 0;
+ constexpr virtual UniquePtr makeShaderModule(ShaderStage type, const String& fileName, const String& entryPoint, const Optional& shaderLocalDescriptor) = 0;
///
/// Called to create a new shader module in the program that is loaded from a stream.
@@ -394,7 +394,7 @@ namespace LiteFX::Rendering {
/// The name of the entry point for the module.
/// The descriptor that binds shader-local data for ray-tracing shaders.
/// The shader module instance.
- constexpr inline virtual UniquePtr makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor) = 0;
+ constexpr virtual UniquePtr makeShaderModule(ShaderStage type, std::istream& stream, const String& name, const String& entryPoint, const Optional& shaderLocalDescriptor) = 0;
public:
///
@@ -405,7 +405,7 @@ namespace LiteFX::Rendering {
/// The name of the entry point for the module.
/// The descriptor that binds shader-local data for ray-tracing shaders.
template
- constexpr inline [[nodiscard]] auto withShaderModule(this TSelf&& self, ShaderStage type, const String& fileName, const String& entryPoint = "main", const Optional& shaderLocalDescriptor = std::nullopt) -> TSelf&& {
+ constexpr [[nodiscard]] auto withShaderModule(this TSelf&& self, ShaderStage type, const String& fileName, const String& entryPoint = "main", const Optional& shaderLocalDescriptor = std::nullopt) -> TSelf&& {
self.m_state.modules.push_back(std::move(static_cast(self).makeShaderModule(type, fileName, entryPoint, shaderLocalDescriptor)));
return std::forward(self);
}
@@ -419,7 +419,7 @@ namespace LiteFX::Rendering {
/// The name of the entry point for the module.
/// The descriptor that binds shader-local data for ray-tracing shaders.
template
- constexpr inline [[nodiscard]] auto withShaderModule(this TSelf&& self, ShaderStage type, std::istream& stream, const String& name, const String& entryPoint = "main", const Optional& shaderLocalDescriptor = std::nullopt) -> TSelf&& {
+ constexpr [[nodiscard]] auto withShaderModule(this TSelf&& self, ShaderStage type, std::istream& stream, const String& name, const String& entryPoint = "main", const Optional& shaderLocalDescriptor = std::nullopt) -> TSelf&& {
self.m_state.modules.push_back(std::move(static_cast(self).makeShaderModule(type, stream, name, entryPoint, shaderLocalDescriptor)));
return std::forward(self);
}
@@ -430,7 +430,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withVertexShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withVertexShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Vertex, fileName, entryPoint));
}
@@ -441,7 +441,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withVertexShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withVertexShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Vertex, stream, name, entryPoint));
}
@@ -454,7 +454,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withTaskShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withTaskShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Task, fileName, entryPoint));
}
///
@@ -467,7 +467,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withTaskShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withTaskShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Task, stream, name, entryPoint));
}
@@ -480,7 +480,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withMeshShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withMeshShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Mesh, fileName, entryPoint));
}
@@ -494,7 +494,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withMeshShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withMeshShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Mesh, stream, name, entryPoint));
}
@@ -504,7 +504,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withTessellationControlShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withTessellationControlShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::TessellationControl, fileName, entryPoint));
}
@@ -515,7 +515,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withTessellationControlShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withTessellationControlShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::TessellationControl, stream, name, entryPoint));
}
@@ -525,7 +525,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withTessellationEvaluationShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withTessellationEvaluationShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::TessellationEvaluation, fileName, entryPoint));
}
@@ -536,7 +536,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withTessellationEvaluationShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withTessellationEvaluationShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::TessellationEvaluation, stream, name, entryPoint));
}
@@ -546,7 +546,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withGeometryShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withGeometryShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Geometry, fileName, entryPoint));
}
@@ -557,7 +557,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withGeometryShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withGeometryShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Geometry, stream, name, entryPoint));
}
@@ -567,7 +567,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withFragmentShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withFragmentShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Fragment, fileName, entryPoint));
}
@@ -578,7 +578,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withFragmentShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withFragmentShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Fragment, stream, name, entryPoint));
}
@@ -588,7 +588,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withComputeShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withComputeShaderModule(this TSelf&& self, const String& fileName, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Compute, fileName, entryPoint));
}
@@ -599,7 +599,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withComputeShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withComputeShaderModule(this TSelf&& self, std::istream& stream, const String& name, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Compute, stream, name, entryPoint));
}
@@ -613,7 +613,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withRayGenerationShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withRayGenerationShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::RayGeneration, fileName, entryPoint, shaderLocalDescriptor));
}
@@ -628,7 +628,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withRayGenerationShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withRayGenerationShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::RayGeneration, stream, name, entryPoint, shaderLocalDescriptor));
}
@@ -642,7 +642,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withMissShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withMissShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Miss, fileName, entryPoint, shaderLocalDescriptor));
}
@@ -657,7 +657,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withMissShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withMissShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Miss, stream, name, entryPoint, shaderLocalDescriptor));
}
@@ -671,7 +671,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withCallableShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withCallableShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Callable, fileName, entryPoint, shaderLocalDescriptor));
}
@@ -686,7 +686,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withCallableShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withCallableShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Callable, stream, name, entryPoint, shaderLocalDescriptor));
}
@@ -699,7 +699,7 @@ namespace LiteFX::Rendering {
/// The file name of the module.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withIntersectionShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withIntersectionShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Intersection, fileName, entryPoint, shaderLocalDescriptor));
}
@@ -714,7 +714,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withIntersectionShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withIntersectionShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::Intersection, stream, name, entryPoint, shaderLocalDescriptor));
}
@@ -728,7 +728,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withAnyHitShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withAnyHitShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::AnyHit, fileName, entryPoint, shaderLocalDescriptor));
}
@@ -743,7 +743,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withAnyHitShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withAnyHitShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::AnyHit, stream, name, entryPoint, shaderLocalDescriptor));
}
@@ -757,7 +757,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withClosestHitShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withClosestHitShaderModule(this TSelf&& self, const String& fileName, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::ClosestHit, fileName, entryPoint, shaderLocalDescriptor));
}
@@ -772,7 +772,7 @@ namespace LiteFX::Rendering {
/// The descriptor that binds shader-local data.
/// The name of the entry point for the module.
template
- constexpr inline [[nodiscard]] auto withClosestHitShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
+ constexpr [[nodiscard]] auto withClosestHitShaderModule(this TSelf&& self, std::istream& stream, const String& name, const Optional& shaderLocalDescriptor = std::nullopt, const String& entryPoint = "main") -> TSelf&& {
return std::forward(self.withShaderModule(ShaderStage::ClosestHit, stream, name, entryPoint, shaderLocalDescriptor));
}
};
@@ -836,7 +836,7 @@ namespace LiteFX::Rendering {
///
/// The polygon mode to initialize the rasterizer state with.
template
- constexpr inline [[nodiscard]] auto polygonMode(this TSelf&& self, PolygonMode mode) noexcept -> TSelf&& {
+ constexpr [[nodiscard]] auto polygonMode(this TSelf&& self, PolygonMode mode) noexcept -> TSelf&& {
self.m_state.polygonMode = mode;
return std::forward(self);
}
@@ -846,7 +846,7 @@ namespace LiteFX::Rendering {
///
/// The cull mode to initialize the rasterizer state with.
template
- constexpr inline [[nodiscard]] auto cullMode(this TSelf&& self, CullMode mode) noexcept -> TSelf&& {
+ constexpr [[nodiscard]] auto cullMode(this TSelf&& self, CullMode mode) noexcept -> TSelf&& {
self.m_state.cullMode = mode;
return std::forward(self);
}
@@ -856,7 +856,7 @@ namespace LiteFX::Rendering {
///
/// The cull order to initialize the rasterizer state with.
template
- constexpr inline [[nodiscard]] auto cullOrder(this TSelf&& self, CullOrder order) noexcept -> TSelf&& {
+ constexpr [[nodiscard]] auto cullOrder(this TSelf&& self, CullOrder order) noexcept -> TSelf&& {
self.m_state.cullOrder = order;
return std::forward(self);
}
@@ -866,7 +866,7 @@ namespace LiteFX::Rendering {
///
/// The line width to initialize the rasterizer state with.
template
- constexpr inline [[nodiscard]] auto lineWidth(this TSelf&& self, Float width) noexcept -> TSelf&& {
+ constexpr [[nodiscard]] auto lineWidth(this TSelf&& self, Float width) noexcept -> TSelf&& {
self.m_state.lineWidth = width;
return std::forward(self);
}
@@ -876,7 +876,7 @@ namespace LiteFX::Rendering {
///
/// The depth bias the rasterizer should use.
template
- constexpr inline [[nodiscard]] auto depthBias(this TSelf&& self, const DepthStencilState::DepthBias& depthBias) noexcept -> TSelf&& {
+ constexpr [[nodiscard]] auto depthBias(this TSelf&& self, const DepthStencilState::DepthBias& depthBias) noexcept -> TSelf&& {
self.m_state.depthBias = depthBias;
return std::forward(self);
}
@@ -886,7 +886,7 @@ namespace LiteFX::Rendering {
///
/// The depth state of the rasterizer.
template
- constexpr inline [[nodiscard]] auto depthState(this TSelf&& self, const DepthStencilState::DepthState& depthState) noexcept -> TSelf&& {
+ constexpr [[nodiscard]] auto depthState(this TSelf&& self, const DepthStencilState::DepthState& depthState) noexcept -> TSelf&& {
self.m_state.depthState = depthState;
return std::forward(self);
}
@@ -896,7 +896,7 @@ namespace LiteFX::Rendering {
///
/// The stencil state of the rasterizer.
template
- constexpr inline [[nodiscard]] auto stencilState(this TSelf&& self, const DepthStencilState::StencilState& stencilState) noexcept -> TSelf&& {
+ constexpr [[nodiscard]] auto stencilState(this TSelf&& self, const DepthStencilState::StencilState& stencilState) noexcept -> TSelf&& {
self.m_state.stencilState = stencilState;
return std::forward(self);
}
@@ -931,7 +931,7 @@ namespace LiteFX::Rendering {
///
/// The attribute to add to the layout.
template
- constexpr inline [[nodiscard]] auto withAttribute(this TSelf&& self, UniquePtr&& attribute) -> TSelf&& {
+ constexpr [[nodiscard]] auto withAttribute(this TSelf&& self, UniquePtr&& attribute) -> TSelf&& {
self.m_state.attributes.push_back(std::move(attribute));
return std::forward(self);
}
@@ -947,7 +947,7 @@ namespace LiteFX::Rendering {
/// The semantic of the attribute.
/// The semantic index of the attribute.
template
- constexpr inline [[nodiscard]] auto withAttribute(this TSelf&& self, BufferFormat format, UInt32 offset, AttributeSemantic semantic = AttributeSemantic::Unknown, UInt32 semanticIndex = 0) -> TSelf&& {
+ constexpr [[nodiscard]] auto withAttribute(this TSelf&& self, BufferFormat format, UInt32 offset, AttributeSemantic semantic = AttributeSemantic::Unknown, UInt32 semanticIndex = 0) -> TSelf&& {
self.withAttribute(std::move(makeUnique(static_cast(self.m_state.attributes.size()), offset, format, semantic, semanticIndex)));
return std::forward(self);
}
@@ -961,7 +961,7 @@ namespace LiteFX::Rendering {
/// The semantic of the attribute.
/// The semantic index of the attribute.
template
- constexpr inline [[nodiscard]] auto withAttribute(this TSelf&& self, UInt32 location, BufferFormat format, UInt32 offset, AttributeSemantic semantic = AttributeSemantic::Unknown, UInt32 semanticIndex = 0) -> TSelf&& {
+ constexpr [[nodiscard]] auto withAttribute(this TSelf&& self, UInt32 location, BufferFormat format, UInt32 offset, AttributeSemantic semantic = AttributeSemantic::Unknown, UInt32 semanticIndex = 0) -> TSelf&& {
self.withAttribute(std::move(makeUnique(location, offset, format, semantic, semanticIndex)));
return std::forward(self);
}
@@ -1011,7 +1011,7 @@ namespace LiteFX::Rendering {
/// The size of a single descriptor.
/// The number of descriptors to bind.
/// The descriptor layout instance.
- constexpr inline virtual UniquePtr makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors) = 0;
+ constexpr virtual UniquePtr makeDescriptor(DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors) = 0;
///
/// Creates a static sampler for the descriptor bound to .
@@ -1028,7 +1028,7 @@ namespace LiteFX::Rendering {
/// The furthest mip map distance level.
/// The maximum anisotropy.
/// The descriptor layout instance for the static sampler.
- constexpr inline virtual UniquePtr makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy) = 0;
+ constexpr virtual UniquePtr makeDescriptor(UInt32 binding, FilterMode magFilter, FilterMode minFilter, BorderMode borderU, BorderMode borderV, BorderMode borderW, MipMapMode mipMapMode, Float mipMapBias, Float minLod, Float maxLod, Float anisotropy) = 0;
public:
///
@@ -1036,7 +1036,7 @@ namespace LiteFX::Rendering {
///
/// The descriptor layout to add.
template
- constexpr inline [[nodiscard]] auto withDescriptor(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
+ constexpr [[nodiscard]] auto withDescriptor(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(layout));
return std::forward(self);
}
@@ -1049,7 +1049,7 @@ namespace LiteFX::Rendering {
/// The size of a single descriptor.
/// The number of descriptors to bind.
template
- constexpr inline [[nodiscard]] auto withDescriptor(this TSelf&& self, DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors = 1) -> TSelf&& {
+ constexpr [[nodiscard]] auto withDescriptor(this TSelf&& self, DescriptorType type, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors = 1) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(type, binding, descriptorSize, descriptors)));
return std::forward(self);
}
@@ -1069,7 +1069,7 @@ namespace LiteFX::Rendering {
/// The furthest mip map distance level.
/// The maximum anisotropy.
template
- constexpr inline [[nodiscard]] auto withStaticSampler(this TSelf&& self, UInt32 binding, FilterMode magFilter = FilterMode::Nearest, FilterMode minFilter = FilterMode::Nearest, BorderMode borderU = BorderMode::Repeat, BorderMode borderV = BorderMode::Repeat, BorderMode borderW = BorderMode::Repeat, MipMapMode mipMapMode = MipMapMode::Nearest, Float mipMapBias = 0.f, Float minLod = 0.f, Float maxLod = std::numeric_limits::max(), Float anisotropy = 0.f) -> TSelf&& {
+ constexpr [[nodiscard]] auto withStaticSampler(this TSelf&& self, UInt32 binding, FilterMode magFilter = FilterMode::Nearest, FilterMode minFilter = FilterMode::Nearest, BorderMode borderU = BorderMode::Repeat, BorderMode borderV = BorderMode::Repeat, BorderMode borderW = BorderMode::Repeat, MipMapMode mipMapMode = MipMapMode::Nearest, Float mipMapBias = 0.f, Float minLod = 0.f, Float maxLod = std::numeric_limits::max(), Float anisotropy = 0.f) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(binding, magFilter, minFilter, borderU, borderV, borderW, mipMapMode, mipMapBias, minLod, maxLod, anisotropy)));
return std::forward(self);
}
@@ -1081,7 +1081,7 @@ namespace LiteFX::Rendering {
/// The size of a single descriptor.
/// The number of descriptors in the array.
template
- constexpr inline [[nodiscard]] auto withConstantBuffer(this TSelf&& self, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors = 1) -> TSelf&& {
+ constexpr [[nodiscard]] auto withConstantBuffer(this TSelf&& self, UInt32 binding, UInt32 descriptorSize, UInt32 descriptors = 1) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(DescriptorType::ConstantBuffer, binding, descriptorSize, descriptors)));
return std::forward(self);
}
@@ -1093,7 +1093,7 @@ namespace LiteFX::Rendering {
/// The number of descriptors in the array.
/// true, if the buffer should be writable.
template
- constexpr inline [[nodiscard]] auto withBuffer(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1, bool writable = false) -> TSelf&& {
+ constexpr [[nodiscard]] auto withBuffer(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1, bool writable = false) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(writable ? DescriptorType::RWBuffer : DescriptorType::Buffer, binding, 0, descriptors)));
return std::forward(self);
}
@@ -1105,7 +1105,7 @@ namespace LiteFX::Rendering {
/// The number of descriptors in the array.
/// true, if the buffer should be writable.
template
- constexpr inline [[nodiscard]] auto withStructuredBuffer(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1, bool writable = false) -> TSelf&& {
+ constexpr [[nodiscard]] auto withStructuredBuffer(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1, bool writable = false) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(writable ? DescriptorType::RWStructuredBuffer : DescriptorType::StructuredBuffer, binding, 0, descriptors)));
return std::forward(self);
}
@@ -1117,7 +1117,7 @@ namespace LiteFX::Rendering {
/// The number of descriptors in the array.
/// true, if the buffer should be writable.
template
- constexpr inline [[nodiscard]] auto withByteAddressBuffer(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1, bool writable = false) -> TSelf&& {
+ constexpr [[nodiscard]] auto withByteAddressBuffer(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1, bool writable = false) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(writable ? DescriptorType::RWByteAddressBuffer : DescriptorType::ByteAddressBuffer, binding, 0, descriptors)));
return std::forward(self);
}
@@ -1129,7 +1129,7 @@ namespace LiteFX::Rendering {
/// The number of descriptors in the array.
/// true, if the buffer should be writable.
template
- constexpr inline [[nodiscard]] auto withTexture(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1, bool writable = false) -> TSelf&& {
+ constexpr [[nodiscard]] auto withTexture(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1, bool writable = false) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(writable ? DescriptorType::RWTexture : DescriptorType::Texture, binding, 0, descriptors)));
return std::forward(self);
}
@@ -1139,7 +1139,7 @@ namespace LiteFX::Rendering {
///
/// The binding point or register index of the descriptor.
template
- constexpr inline [[nodiscard]] auto withInputAttachment(this TSelf&& self, UInt32 binding) -> TSelf&& {
+ constexpr [[nodiscard]] auto withInputAttachment(this TSelf&& self, UInt32 binding) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(DescriptorType::InputAttachment, binding, 0)));
return std::forward(self);
}
@@ -1152,7 +1152,7 @@ namespace LiteFX::Rendering {
///
/// The binding point or register index of the descriptor.
template
- constexpr inline [[nodiscard]] auto withAccelerationStructure(this TSelf&& self, UInt32 binding) -> TSelf&& {
+ constexpr [[nodiscard]] auto withAccelerationStructure(this TSelf&& self, UInt32 binding) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(DescriptorType::AccelerationStructure, binding, 0)));
return std::forward(self);
}
@@ -1163,7 +1163,7 @@ namespace LiteFX::Rendering {
/// The binding point or register index of the descriptor.
/// The number of descriptors in the array.
template
- constexpr inline [[nodiscard]] auto withSampler(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1) -> TSelf&& {
+ constexpr [[nodiscard]] auto withSampler(this TSelf&& self, UInt32 binding, UInt32 descriptors = 1) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(self.makeDescriptor(DescriptorType::Sampler, binding, 0, descriptors)));
return std::forward(self);
}
@@ -1173,7 +1173,7 @@ namespace LiteFX::Rendering {
///
/// The space, the descriptor set is bound to.
template
- constexpr inline auto space(this TSelf&& self, UInt32 space) noexcept -> TSelf&& {
+ constexpr auto space(this TSelf&& self, UInt32 space) noexcept -> TSelf&& {
self.m_state.space = space;
return std::forward(self);
}
@@ -1183,7 +1183,7 @@ namespace LiteFX::Rendering {
///
/// The shader stages, the descriptor set is accessible from.
template
- constexpr inline auto shaderStages(this TSelf&& self, ShaderStage stages) noexcept -> TSelf&& {
+ constexpr auto shaderStages(this TSelf&& self, ShaderStage stages) noexcept -> TSelf&& {
self.m_state.stages = stages;
return std::forward(self);
}
@@ -1195,7 +1195,7 @@ namespace LiteFX::Rendering {
/// The layout of the descriptor.
///
template
- constexpr inline [[nodiscard]] auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
+ constexpr [[nodiscard]] auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
self.m_state.descriptorLayouts.push_back(std::move(layout));
return std::forward(self);
}
@@ -1234,7 +1234,7 @@ namespace LiteFX::Rendering {
/// The descriptor space, the range is bound to.
/// The binding point for the range.
/// The instance of the push constant range.
- virtual inline UniquePtr makeRange(ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding) = 0;
+ virtual UniquePtr makeRange(ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding) = 0;
public:
///
@@ -1246,7 +1246,7 @@ namespace LiteFX::Rendering {
/// The descriptor space, the range is bound to.
/// The binding point for the range.
template
- constexpr inline auto withRange(this TSelf&& self, ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding) -> TSelf&& {
+ constexpr auto withRange(this TSelf&& self, ShaderStage shaderStages, UInt32 offset, UInt32 size, UInt32 space, UInt32 binding) -> TSelf&& {
self.m_state.ranges.push_back(std::move(self.makeRange(shaderStages, offset, size, space, binding)));
return std::forward(self);
}
@@ -1289,7 +1289,7 @@ namespace LiteFX::Rendering {
/// The layout of the descriptor set.
///
template
- constexpr inline auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
+ constexpr auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
self.m_state.descriptorSetLayouts.push_back(std::move(layout));
return std::forward(self);
}
@@ -1300,7 +1300,7 @@ namespace LiteFX::Rendering {
/// The layout of the push constants range.
///
template
- constexpr inline auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
+ constexpr auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
self.m_state.pushConstantsLayout = std::move(layout);
return std::forward(self);
}
@@ -1347,7 +1347,7 @@ namespace LiteFX::Rendering {
///
/// The topology to initialize the input assembler with.
template
- constexpr inline auto topology(this TSelf&& self, PrimitiveTopology topology) -> TSelf&& {
+ constexpr auto topology(this TSelf&& self, PrimitiveTopology topology) -> TSelf&& {
self.m_state.topology = topology;
return std::forward(self);
}
@@ -1357,7 +1357,7 @@ namespace LiteFX::Rendering {
///
/// The layout to add to the input assembler.
template
- constexpr inline auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
+ constexpr auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
self.m_state.vertexBufferLayouts.push_back(std::move(layout));
return std::forward(self);
}
@@ -1368,7 +1368,7 @@ namespace LiteFX::Rendering {
///
/// Thrown if another index buffer layout has already been specified.
template
- constexpr inline auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
+ constexpr auto use(this TSelf&& self, UniquePtr&& layout) -> TSelf&& {
self.m_state.indexBufferLayout = std::move(layout);
return std::forward(self);
}
@@ -1436,7 +1436,7 @@ namespace LiteFX::Rendering {
///
/// The program to add to the pipeline layout.
template
- constexpr inline auto shaderProgram(this TSelf&& self, SharedPtr program) -> TSelf&& {
+ constexpr auto shaderProgram(this TSelf&& self, SharedPtr program) -> TSelf&& {
self.m_state.shaderProgram = program;
return std::forward(self);
}
@@ -1446,7 +1446,7 @@ namespace LiteFX::Rendering {
///
/// The pipeline layout to initialize the render pipeline with.
template
- constexpr inline auto layout(this TSelf&& self, SharedPtr layout) -> TSelf&& {
+ constexpr auto layout(this TSelf&& self, SharedPtr layout) -> TSelf&& {
self.m_state.pipelineLayout = layout;
return std::forward(self);
}
@@ -1456,7 +1456,7 @@ namespace LiteFX::Rendering {
///
/// The rasterizer state to initialize the render pipeline with.
template
- constexpr inline auto rasterizer(this TSelf&& self, SharedPtr rasterizer) -> TSelf&& {
+ constexpr auto rasterizer(this TSelf&& self, SharedPtr rasterizer) -> TSelf&& {
self.m_state.rasterizer = rasterizer;
return std::forward(self);
}
@@ -1466,7 +1466,7 @@ namespace LiteFX::Rendering {
///
/// The input assembler state to initialize the render pipeline with.
template
- constexpr inline auto inputAssembler(this TSelf&& self, SharedPtr inputAssembler) -> TSelf&& {
+ constexpr auto inputAssembler(this TSelf&& self, SharedPtr inputAssembler) -> TSelf&& {
self.m_state.inputAssembler = inputAssembler;
return std::forward(self);
}
@@ -1479,7 +1479,7 @@ namespace LiteFX::Rendering {
///
/// Whether or not to use Alpha-to-Coverage multi-sampling.
template
- constexpr inline auto enableAlphaToCoverage(this TSelf&& self, bool enable = true) -> TSelf&& {
+ constexpr auto enableAlphaToCoverage(this TSelf&& self, bool enable = true) -> TSelf&& {
self.m_state.enableAlphaToCoverage = enable;
return std::forward(self);
}
@@ -1489,7 +1489,7 @@ namespace LiteFX::Rendering {
///
/// The multi-sampling level of the render pipeline.
template
- constexpr inline auto samples(this TSelf&& self, MultiSamplingLevel samples) -> TSelf&& {
+ constexpr auto samples(this TSelf&& self, MultiSamplingLevel samples) -> TSelf&& {
self.m_state.samples = samples;
return std::forward(self);
}
@@ -1535,7 +1535,7 @@ namespace LiteFX::Rendering {
///
/// The program to add to the pipeline layout.
template
- constexpr inline auto shaderProgram(this TSelf&& self, SharedPtr program) -> TSelf&& {
+ constexpr auto shaderProgram(this TSelf&& self, SharedPtr program) -> TSelf&& {
self.m_state.shaderProgram = program;
return std::forward(self);
}
@@ -1545,7 +1545,7 @@ namespace LiteFX::Rendering {
///
/// The pipeline layout to initialize the compute pipeline with.
template
- constexpr inline auto layout(this TSelf&& self, SharedPtr layout) -> TSelf&& {
+ constexpr auto layout(this TSelf&& self, SharedPtr layout) -> TSelf&& {
self.m_state.pipelineLayout = layout;
return std::forward(self);
}
@@ -1597,7 +1597,7 @@ namespace LiteFX::Rendering {
///
/// The pipeline layout to initialize the ray-tracing pipeline with.
template
- constexpr inline auto layout(this TSelf&& self, SharedPtr layout) -> TSelf&& {
+ constexpr auto layout(this TSelf&& self, SharedPtr layout) -> TSelf&& {
self.m_state.pipelineLayout = layout;
return std::forward(self);
}
@@ -1607,7 +1607,7 @@ namespace LiteFX::Rendering {
///
/// The maximum number of ray bounces allowed in the pipeline.
template
- constexpr inline auto maxBounces(this TSelf&& self, UInt32 maxRecursionDepth) -> TSelf&& {
+ constexpr auto maxBounces(this TSelf&& self, UInt32 maxRecursionDepth) -> TSelf&& {
self.m_state.maxRecursionDepth = maxRecursionDepth;
return std::forward(self);
}
@@ -1617,7 +1617,7 @@ namespace LiteFX::Rendering {
///
/// The maximum size for ray payloads in the pipeline.
template
- constexpr inline auto maxPayloadSize(this TSelf&& self, UInt32 maxPayloadSize) -> TSelf&& {
+ constexpr auto maxPayloadSize(this TSelf&& self, UInt32 maxPayloadSize) -> TSelf&& {
self.m_state.maxPayloadSize = maxPayloadSize;
return std::forward(self);
}
@@ -1627,7 +1627,7 @@ namespace LiteFX::Rendering {
///
/// The maximum size for ray attributes in the pipeline.
template
- constexpr inline auto maxAttributeSize(this TSelf&& self, UInt32 maxAttributeSize) -> TSelf&& {
+ constexpr auto maxAttributeSize(this TSelf&& self, UInt32 maxAttributeSize) -> TSelf&& {
self.m_state.maxAttributeSize = maxAttributeSize;
return std::forward(self);
}
@@ -1684,7 +1684,7 @@ namespace LiteFX::Rendering {
/// The descriptor binding on which to bind the mapped render target.
/// The render target of the render pass.
/// The input attachment mapping that describes the relation between the earlier render pass render target and the input location.
- virtual inline RenderPassDependency makeInputAttachment(DescriptorBindingPoint binding, const RenderTarget& renderTarget) = 0;
+ virtual RenderPassDependency makeInputAttachment(DescriptorBindingPoint binding, const RenderTarget& renderTarget) = 0;
public:
///
@@ -1696,7 +1696,7 @@ namespace LiteFX::Rendering {
///
/// The command queue, the render pass will execute on.
template
- constexpr inline auto executeOn(this TSelf&& self, const command_queue_type& queue) -> TSelf&& {
+ constexpr auto executeOn(this TSelf&& self, const command_queue_type& queue) -> TSelf&& {
self.m_state.commandQueue = &queue;
return std::forward(self);
}
@@ -1706,7 +1706,7 @@ namespace LiteFX::Rendering {
///
/// The number of command buffers.
template
- constexpr inline auto commandBuffers(this TSelf&& self, UInt32 count) -> TSelf&& {
+ constexpr auto commandBuffers(this TSelf&& self, UInt32 count) -> TSelf&& {
self.m_state.commandBufferCount = count;
return std::forward(self);
}
@@ -1719,7 +1719,7 @@ namespace LiteFX::Rendering {
/// The flags that control the behavior of the render target.
/// The fixed clear value for the render target.
template
- constexpr inline auto renderTarget(this TSelf&& self, RenderTargetType type, Format format, RenderTargetFlags flags = RenderTargetFlags::None, const Vector4f& clearValues = { 0.0f, 0.0f, 0.0f, 0.0f }) -> TSelf&& {
+ constexpr auto renderTarget(this TSelf&& self, RenderTargetType type, Format format, RenderTargetFlags flags = RenderTargetFlags::None, const Vector4f& clearValues = { 0.0f, 0.0f, 0.0f, 0.0f }) -> TSelf&& {
self.renderTarget("", static_cast(self.m_state.renderTargets.size()), type, format, flags, clearValues);
return std::forward(self);
}
@@ -1733,7 +1733,7 @@ namespace LiteFX::Rendering {
/// The flags that control the behavior of the render target.
/// The fixed clear value for the render target.
template
- constexpr inline auto renderTarget(this TSelf&& self, const String& name, RenderTargetType type, Format format, RenderTargetFlags flags = RenderTargetFlags::None, const Vector4f& clearValues = { 0.0f, 0.0f, 0.0f, 0.0f }) -> TSelf&& {
+ constexpr auto renderTarget(this TSelf&& self, const String& name, RenderTargetType type, Format format, RenderTargetFlags flags = RenderTargetFlags::None, const Vector4f& clearValues = { 0.0f, 0.0f, 0.0f, 0.0f }) -> TSelf&& {
self.renderTarget(name, static_cast(self.m_state.renderTargets.size()), type, format, flags, clearValues);
return std::forward(self);
}
@@ -1747,7 +1747,7 @@ namespace LiteFX::Rendering {
/// The flags that control the behavior of the render target.
/// The fixed clear value for the render target.
template
- constexpr inline auto renderTarget(this TSelf&& self, UInt32 location, RenderTargetType type, Format format, RenderTargetFlags flags = RenderTargetFlags::None, const Vector4f& clearValues = { 0.0f, 0.0f, 0.0f, 0.0f }) -> TSelf&& {
+ constexpr auto renderTarget(this TSelf&& self, UInt32 location, RenderTargetType type, Format format, RenderTargetFlags flags = RenderTargetFlags::None, const Vector4f& clearValues = { 0.0f, 0.0f, 0.0f, 0.0f }) -> TSelf&& {
self.renderTarget("", location, type, format, flags, clearValues);
return std::forward(self);
}
@@ -1762,7 +1762,7 @@ namespace LiteFX::Rendering {
/// The color format of the render target.
/// The fixed clear value for the render target.
template
- constexpr inline auto renderTarget(this TSelf&& self, const String& name, UInt32 location, RenderTargetType type, Format format, RenderTargetFlags flags = RenderTargetFlags::None, const Vector4f& clearValues = { 0.0f, 0.0f, 0.0f, 0.0f }) -> TSelf&& {
+ constexpr auto renderTarget(this TSelf&& self, const String& name, UInt32 location, RenderTargetType type, Format format, RenderTargetFlags flags = RenderTargetFlags::None, const Vector4f& clearValues = { 0.0f, 0.0f, 0.0f, 0.0f }) -> TSelf&& {
self.m_state.renderTargets.push_back(RenderTarget(name, location, type, format, flags, clearValues));
return std::forward(self);
}
@@ -1774,7 +1774,7 @@ namespace LiteFX::Rendering {
/// The render pass, the input attachment is created from.
/// The location to which the input attachment is written by .
template
- constexpr inline auto inputAttachment(this TSelf&& self, DescriptorBindingPoint binding, const render_pass_type& renderPass, UInt32 outputLocation) -> TSelf&& {
+ constexpr auto inputAttachment(this TSelf&& self, DescriptorBindingPoint binding, const render_pass_type& renderPass, UInt32 outputLocation) -> TSelf&& {
self.m_state.inputAttachments.push_back(static_cast(self).makeInputAttachment(binding, renderPass.renderTarget(outputLocation)));
return std::forward(self);
}
@@ -1785,7 +1785,7 @@ namespace LiteFX::Rendering {
/// The descriptor binding on which to bind the mapped render target.
/// The render target that is bound as input attachment.
template
- constexpr inline auto inputAttachment(this TSelf&& self, DescriptorBindingPoint binding, RenderTarget renderTarget) -> TSelf&& {
+ constexpr auto inputAttachment(this TSelf&& self, DescriptorBindingPoint binding, RenderTarget renderTarget) -> TSelf&& {
self.m_state.inputAttachments.push_back(static_cast(self).makeInputAttachment(binding, renderTarget));
return std::forward(self);
}
@@ -1795,7 +1795,7 @@ namespace LiteFX::Rendering {
///
/// The register and space of the descriptor to bind the input attachment sampler to.
template
- constexpr inline auto inputAttachmentSamplerBinding(this TSelf&& self, const DescriptorBindingPoint& bindingPoint) -> TSelf&& {
+ constexpr auto inputAttachmentSamplerBinding(this TSelf&& self, const DescriptorBindingPoint& bindingPoint) -> TSelf&& {
self.m_state.inputAttachmentSamplerBinding = bindingPoint;
return std::forward(self);
}
diff --git a/src/Rendering/src/convert.cpp b/src/Rendering/src/convert.cpp
index 5defbf0bb..4ae706364 100644
--- a/src/Rendering/src/convert.cpp
+++ b/src/Rendering/src/convert.cpp
@@ -3,7 +3,7 @@
using namespace LiteFX::Rendering;
-constexpr size_t LiteFX::Rendering::getSize(Format format)
+size_t LiteFX::Rendering::getSize(Format format)
{
switch (format) {
using enum Format;
@@ -170,7 +170,7 @@ constexpr size_t LiteFX::Rendering::getSize(Format format)
}
}
-constexpr bool LiteFX::Rendering::hasDepth(Format format)
+bool LiteFX::Rendering::hasDepth(Format format)
{
const Array depthFormats = {
Format::D16_UNORM,
@@ -184,7 +184,7 @@ constexpr bool LiteFX::Rendering::hasDepth(Format format)
return std::any_of(std::begin(depthFormats), std::end(depthFormats), [&](Format f) { return f == format; });
}
-constexpr bool LiteFX::Rendering::hasStencil(Format format)
+bool LiteFX::Rendering::hasStencil(Format format)
{
const Array stencilFormats = {
Format::D16_UNORM_S8_UINT,
diff --git a/src/Samples/Indirect/src/sample.cpp b/src/Samples/Indirect/src/sample.cpp
index 0d37519a0..e86bc9939 100644
--- a/src/Samples/Indirect/src/sample.cpp
+++ b/src/Samples/Indirect/src/sample.cpp
@@ -58,7 +58,7 @@ const String FileExtensions::SHADER = "spv";
const String FileExtensions::SHADER = "dxi";
#endif // LITEFX_BUILD_DIRECTX_12_BACKEND
-static constexpr inline glm::vec4 normalizePlane(const glm::vec4& plane) {
+static constexpr glm::vec4 normalizePlane(const glm::vec4& plane) {
return plane / glm::length(glm::vec3(plane));
}
diff --git a/src/cmake/Modules.cmake b/src/cmake/Modules.cmake
index 9b26c63cb..4a25c656a 100644
--- a/src/cmake/Modules.cmake
+++ b/src/cmake/Modules.cmake
@@ -7,7 +7,4 @@
# Setup default module path.
IF("${CMAKE_MODULE_PATH}" STREQUAL "")
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" CACHE PATH "Module directory." FORCE)
-ENDIF("${CMAKE_MODULE_PATH}" STREQUAL "")
-
-# Define overlay ports (separated by `;`).
-SET(VCPKG_OVERLAY_PORTS "${CMAKE_SOURCE_DIR}/modules/overlay-ports/winpixeventruntime/;${CMAKE_SOURCE_DIR}/modules/overlay-ports/dx-agility-sdk/;${CMAKE_SOURCE_DIR}/modules/overlay-ports/d3d12-memory-allocator/;${CMAKE_SOURCE_DIR}/modules/overlay-ports/spdlog/")
\ No newline at end of file
+ENDIF("${CMAKE_MODULE_PATH}" STREQUAL "")
\ No newline at end of file
diff --git a/src/cmake/Options.cmake b/src/cmake/Options.cmake
index 52c5dec1e..00e294898 100644
--- a/src/cmake/Options.cmake
+++ b/src/cmake/Options.cmake
@@ -4,6 +4,8 @@
##### #####
###################################################################################################
+OPTION(BUILD_SHARED_LIBS "Link libraries as shared objects." ON)
+
OPTION(LITEFX_BUILD_VULKAN_BACKEND "Builds the Vulkan backend." ON)
OPTION(LITEFX_BUILD_DIRECTX_12_BACKEND "Builds the DirectX 12 backend." ON)
diff --git a/src/vcpkg-configuration.json b/src/vcpkg-configuration.json
new file mode 100644
index 000000000..c99ad7f8d
--- /dev/null
+++ b/src/vcpkg-configuration.json
@@ -0,0 +1,9 @@
+{
+ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
+ "overlay-ports": [
+ "./Modules/overlay-ports"
+ ],
+ "overlay-triplets": [
+ "./Modules/overlay-triplets"
+ ]
+}
\ No newline at end of file