summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-03-08 03:25:04 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-03-19 00:38:17 +0000
commita2bb18ddd181a0eb3f9f553eeeba19d032feee9c (patch)
tree911cbbf9be28681630603d7f4ec050850c9cc264 /Graphics/GraphicsEngineVulkan
parentOpenGL backend: reorganized headers, removed signature methods implemented by... (diff)
downloadDiligentCore-a2bb18ddd181a0eb3f9f553eeeba19d032feee9c.tar.gz
DiligentCore-a2bb18ddd181a0eb3f9f553eeeba19d032feee9c.zip
Vk backend: reorganized headers; removed PRS methods implemented in PipelineResourceSignatureBase
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/CMakeLists.txt5
-rw-r--r--Graphics/GraphicsEngineVulkan/include/BottomLevelASVkImpl.hpp4
-rw-r--r--Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/BufferVkImpl.hpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.hpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.hpp7
-rw-r--r--Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.hpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.hpp26
-rw-r--r--Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/FramebufferCache.hpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/include/FramebufferVkImpl.hpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/GenerateMipsVkHelper.hpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ManagedVulkanObject.hpp4
-rw-r--r--Graphics/GraphicsEngineVulkan/include/PipelineResourceAttribsVk.hpp147
-rw-r--r--Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp122
-rw-r--r--Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp9
-rw-r--r--Graphics/GraphicsEngineVulkan/include/QueryVkImpl.hpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp11
-rw-r--r--Graphics/GraphicsEngineVulkan/include/RenderPassCache.hpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.hpp3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderBindingTableVkImpl.hpp3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.hpp7
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.hpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderVariableManagerVk.hpp (renamed from Graphics/GraphicsEngineVulkan/include/ShaderVariableVk.hpp)31
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.hpp3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/TextureVkImpl.hpp3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/TopLevelASVkImpl.hpp3
-rw-r--r--Graphics/GraphicsEngineVulkan/src/BottomLevelASVkImpl.cpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/FramebufferCache.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/FramebufferVkImpl.cpp7
-rw-r--r--Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineLayoutVk.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp34
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp9
-rw-r--r--Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp5
-rw-r--r--Graphics/GraphicsEngineVulkan/src/QueryVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp5
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp5
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderBindingTableVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderVariableManagerVk.cpp (renamed from Graphics/GraphicsEngineVulkan/src/ShaderVariableVk.cpp)27
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/src/TopLevelASVkImpl.cpp1
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp5
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp4
54 files changed, 323 insertions, 241 deletions
diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
index 61fe931e..a0a921d6 100644
--- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt
+++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
@@ -29,7 +29,7 @@ set(INCLUDE
include/ManagedVulkanObject.hpp
include/ShaderResourceBindingVkImpl.hpp
include/ShaderResourceCacheVk.hpp
- include/ShaderVariableVk.hpp
+ include/ShaderVariableManagerVk.hpp
include/SwapChainVkImpl.hpp
include/TextureVkImpl.hpp
include/TextureViewVkImpl.hpp
@@ -40,6 +40,7 @@ set(INCLUDE
include/TopLevelASVkImpl.hpp
include/ShaderBindingTableVkImpl.hpp
include/PipelineResourceSignatureVkImpl.hpp
+ include/PipelineResourceAttribsVk.hpp
)
set(VULKAN_UTILS_INCLUDE
@@ -104,7 +105,7 @@ set(SRC
src/ShaderVkImpl.cpp
src/ShaderResourceBindingVkImpl.cpp
src/ShaderResourceCacheVk.cpp
- src/ShaderVariableVk.cpp
+ src/ShaderVariableManagerVk.cpp
src/SwapChainVkImpl.cpp
src/TextureVkImpl.cpp
src/TextureViewVkImpl.cpp
diff --git a/Graphics/GraphicsEngineVulkan/include/BottomLevelASVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/BottomLevelASVkImpl.hpp
index 469aef6d..3f421920 100644
--- a/Graphics/GraphicsEngineVulkan/include/BottomLevelASVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/BottomLevelASVkImpl.hpp
@@ -30,11 +30,11 @@
/// \file
/// Definition of the Diligent::BottomLevelASVkImpl class
-#include "RenderDeviceVk.h"
-#include "RenderDeviceVkImpl.hpp"
+#include "EngineVkImplTraits.hpp"
#include "BottomLevelASVk.h"
#include "BottomLevelASBase.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
+#include "VulkanUtilities/VulkanMemoryManager.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp
index 15091572..09d4b6dc 100644
--- a/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp
@@ -30,11 +30,10 @@
/// \file
/// Declaration of Diligent::BufferViewVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "BufferViewVk.h"
-#include "RenderDeviceVk.h"
#include "BufferViewBase.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
-#include "RenderDeviceVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.hpp
index caffa62f..2144fafc 100644
--- a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.hpp
@@ -30,15 +30,15 @@
/// \file
/// Declaration of Diligent::BufferVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "BufferVk.h"
-#include "RenderDeviceVk.h"
#include "BufferBase.hpp"
-#include "BufferViewVkImpl.hpp"
+#include "BufferViewVkImpl.hpp" // Required by BufferBase
+
#include "VulkanDynamicHeap.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
#include "VulkanUtilities/VulkanMemoryManager.hpp"
#include "STDAllocator.hpp"
-#include "RenderDeviceVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.hpp
index 63707812..2fff7842 100644
--- a/Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.hpp
@@ -30,6 +30,7 @@
/// \file
/// Declaration of Diligent::CommandListVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "VulkanUtilities/VulkanHeaders.h"
#include "CommandListBase.hpp"
#include "RenderDeviceVkImpl.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.hpp
index cc1f7e3d..a9a61dee 100644
--- a/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.hpp
@@ -34,12 +34,15 @@
#include <deque>
#include <atomic>
-#include "VulkanUtilities/VulkanHeaders.h"
+#include "EngineVkImplTraits.hpp"
#include "CommandQueueVk.h"
#include "ObjectBase.hpp"
-#include "VulkanUtilities/VulkanLogicalDevice.hpp"
#include "FenceVkImpl.hpp"
+#include "VulkanUtilities/VulkanHeaders.h"
+#include "VulkanUtilities/VulkanLogicalDevice.hpp"
+
+
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.hpp b/Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.hpp
index ae77ccaa..54fbe0ed 100644
--- a/Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.hpp
@@ -34,6 +34,7 @@
#include <deque>
#include <mutex>
#include <atomic>
+
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.hpp
index ff0e27de..ed2adf11 100644
--- a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.hpp
@@ -33,30 +33,34 @@
#include <unordered_map>
#include <bitset>
+#include "EngineVkImplTraits.hpp"
+
#include "DeviceContextVk.h"
#include "DeviceContextNextGenBase.hpp"
-#include "VulkanUtilities/VulkanCommandBufferPool.hpp"
-#include "VulkanUtilities/VulkanCommandBuffer.hpp"
-#include "VulkanUploadHeap.hpp"
-#include "VulkanDynamicHeap.hpp"
-#include "ResourceReleaseQueue.hpp"
-#include "DescriptorPoolManager.hpp"
-#include "PipelineLayoutVk.hpp"
-#include "GenerateMipsVkHelper.hpp"
+
+// Vk object implementations are required by DeviceContextBase
#include "BufferVkImpl.hpp"
#include "TextureVkImpl.hpp"
#include "PipelineStateVkImpl.hpp"
#include "QueryVkImpl.hpp"
#include "FramebufferVkImpl.hpp"
#include "RenderPassVkImpl.hpp"
-#include "HashUtils.hpp"
-#include "ManagedVulkanObject.hpp"
-#include "QueryManagerVk.hpp"
#include "BottomLevelASVkImpl.hpp"
#include "TopLevelASVkImpl.hpp"
#include "ShaderBindingTableVkImpl.hpp"
#include "ShaderResourceBindingVkImpl.hpp"
+#include "GenerateMipsVkHelper.hpp"
+#include "PipelineLayoutVk.hpp"
+#include "VulkanUtilities/VulkanCommandBufferPool.hpp"
+#include "VulkanUtilities/VulkanCommandBuffer.hpp"
+#include "VulkanUploadHeap.hpp"
+#include "VulkanDynamicHeap.hpp"
+#include "ResourceReleaseQueue.hpp"
+#include "DescriptorPoolManager.hpp"
+#include "HashUtils.hpp"
+#include "ManagedVulkanObject.hpp"
+#include "QueryManagerVk.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp
index a3a81edc..b720d604 100644
--- a/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp
@@ -33,10 +33,10 @@
#include <deque>
#include <atomic>
+#include "EngineVkImplTraits.hpp"
#include "FenceVk.h"
#include "FenceBase.hpp"
#include "VulkanUtilities/VulkanFencePool.hpp"
-#include "RenderDeviceVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/FramebufferCache.hpp b/Graphics/GraphicsEngineVulkan/include/FramebufferCache.hpp
index 2a26bf51..28f55b67 100644
--- a/Graphics/GraphicsEngineVulkan/include/FramebufferCache.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/FramebufferCache.hpp
@@ -32,6 +32,7 @@
#include <unordered_map>
#include <mutex>
+
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/include/FramebufferVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/FramebufferVkImpl.hpp
index 6877fd3d..19d4fd2a 100644
--- a/Graphics/GraphicsEngineVulkan/include/FramebufferVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/FramebufferVkImpl.hpp
@@ -30,9 +30,9 @@
/// \file
/// Declaration of Diligent::FramebufferVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "FramebufferVk.h"
#include "FramebufferBase.hpp"
-#include "RenderDeviceVkImpl.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/include/GenerateMipsVkHelper.hpp b/Graphics/GraphicsEngineVulkan/include/GenerateMipsVkHelper.hpp
index 80a75309..fbc0ef4c 100644
--- a/Graphics/GraphicsEngineVulkan/include/GenerateMipsVkHelper.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/GenerateMipsVkHelper.hpp
@@ -32,6 +32,7 @@
#include <array>
#include <unordered_map>
+
#include "VulkanUtilities/VulkanLogicalDevice.hpp"
#include "VulkanUtilities/VulkanCommandBuffer.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/include/ManagedVulkanObject.hpp b/Graphics/GraphicsEngineVulkan/include/ManagedVulkanObject.hpp
index b1e38a61..18f1cf65 100644
--- a/Graphics/GraphicsEngineVulkan/include/ManagedVulkanObject.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/ManagedVulkanObject.hpp
@@ -28,12 +28,14 @@
#pragma once
#include "DeviceObjectBase.hpp"
-#include "RenderDeviceVkImpl.hpp"
#include "VulkanUtilities/VulkanLogicalDevice.hpp"
+#include "RenderDeviceVkImpl.hpp" // Required by by ~ManagedVulkanObject()
namespace Diligent
{
+class RenderDeviceVkImpl;
+
template <typename VulkanObjectWrapperType>
class ManagedVulkanObject : public DeviceObjectBase<IDeviceObject, RenderDeviceVkImpl, DeviceObjectAttribs>
{
diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineResourceAttribsVk.hpp b/Graphics/GraphicsEngineVulkan/include/PipelineResourceAttribsVk.hpp
new file mode 100644
index 00000000..a597cb54
--- /dev/null
+++ b/Graphics/GraphicsEngineVulkan/include/PipelineResourceAttribsVk.hpp
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2019-2021 Diligent Graphics LLC
+ * Copyright 2015-2019 Egor Yusov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * In no event and under no legal theory, whether in tort (including negligence),
+ * contract, or otherwise, unless required by applicable law (such as deliberate
+ * and grossly negligent acts) or agreed to in writing, shall any Contributor be
+ * liable for any damages, including any direct, indirect, special, incidental,
+ * or consequential damages of any character arising as a result of this License or
+ * out of the use or inability to use the software (including but not limited to damages
+ * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
+ * all other commercial damages or losses), even if such Contributor has been advised
+ * of the possibility of such damages.
+ */
+
+#pragma once
+
+/// \file
+/// Declaration of Diligent::PipelineResourceSignatureVkImpl struct
+
+#include "BasicTypes.h"
+#include "ShaderResourceCacheCommon.hpp"
+#include "PrivateConstants.h"
+#include "DebugUtilities.hpp"
+
+namespace Diligent
+{
+
+enum class DescriptorType : Uint8
+{
+ Sampler,
+ CombinedImageSampler,
+ SeparateImage,
+ StorageImage,
+ UniformTexelBuffer,
+ StorageTexelBuffer,
+ StorageTexelBuffer_ReadOnly,
+ UniformBuffer,
+ UniformBufferDynamic,
+ StorageBuffer,
+ StorageBuffer_ReadOnly,
+ StorageBufferDynamic,
+ StorageBufferDynamic_ReadOnly,
+ InputAttachment,
+ AccelerationStructure,
+ Count,
+ Unknown = 0xFF,
+};
+
+
+// sizeof(PipelineResourceAttribsVk) == 16, x64
+struct PipelineResourceAttribsVk
+{
+private:
+ static constexpr Uint32 _BindingIndexBits = 16;
+ static constexpr Uint32 _SamplerIndBits = 16;
+ static constexpr Uint32 _ArraySizeBits = 26;
+ static constexpr Uint32 _DescrTypeBits = 4;
+ static constexpr Uint32 _DescrSetBits = 1;
+ static constexpr Uint32 _SamplerAssignedBits = 1;
+
+ static_assert((_BindingIndexBits + _ArraySizeBits + _SamplerIndBits + _DescrTypeBits + _DescrSetBits + _SamplerAssignedBits) % 32 == 0, "Bits are not optimally packed");
+
+ // clang-format off
+ static_assert((1u << _DescrTypeBits) >= static_cast<Uint32>(DescriptorType::Count), "Not enough bits to store DescriptorType values");
+ static_assert((1u << _BindingIndexBits) >= MAX_RESOURCES_IN_SIGNATURE, "Not enough bits to store resource binding index");
+ static_assert((1u << _SamplerIndBits) >= MAX_RESOURCES_IN_SIGNATURE, "Not enough bits to store sampler resource index");
+ // clang-format on
+
+public:
+ static constexpr Uint32 MaxDescriptorSets = (1u << _DescrSetBits);
+ static constexpr Uint32 InvalidSamplerInd = (1u << _SamplerIndBits) - 1;
+
+ // clang-format off
+ const Uint32 BindingIndex : _BindingIndexBits; // Binding in the descriptor set
+ const Uint32 SamplerInd : _SamplerIndBits; // Index of the assigned sampler in m_Desc.Resources and m_pPipelineResourceAttribsVk
+ const Uint32 ArraySize : _ArraySizeBits; // Array size
+ const Uint32 DescrType : _DescrTypeBits; // Descriptor type (DescriptorType)
+ const Uint32 DescrSet : _DescrSetBits; // Descriptor set (0 or 1)
+ const Uint32 ImtblSamplerAssigned : _SamplerAssignedBits; // Immutable sampler flag
+
+ const Uint32 SRBCacheOffset; // Offset in the SRB resource cache
+ const Uint32 StaticCacheOffset; // Offset in the static resource cache
+ // clang-format on
+
+ PipelineResourceAttribsVk(Uint32 _BindingIndex,
+ Uint32 _SamplerInd,
+ Uint32 _ArraySize,
+ DescriptorType _DescrType,
+ Uint32 _DescrSet,
+ bool _ImtblSamplerAssigned,
+ Uint32 _SRBCacheOffset,
+ Uint32 _StaticCacheOffset) noexcept :
+ // clang-format off
+ BindingIndex {_BindingIndex },
+ SamplerInd {_SamplerInd },
+ ArraySize {_ArraySize },
+ DescrType {static_cast<Uint32>(_DescrType)},
+ DescrSet {_DescrSet },
+ ImtblSamplerAssigned {_ImtblSamplerAssigned ? 1u : 0u},
+ SRBCacheOffset {_SRBCacheOffset },
+ StaticCacheOffset {_StaticCacheOffset }
+ // clang-format on
+ {
+ // clang-format off
+ VERIFY(BindingIndex == _BindingIndex, "Binding index (", _BindingIndex, ") exceeds maximum representable value");
+ VERIFY(ArraySize == _ArraySize, "Array size (", _ArraySize, ") exceeds maximum representable value");
+ VERIFY(SamplerInd == _SamplerInd, "Sampler index (", _SamplerInd, ") exceeds maximum representable value");
+ VERIFY(GetDescriptorType() == _DescrType, "Descriptor type (", static_cast<Uint32>(_DescrType), ") exceeds maximum representable value");
+ VERIFY(DescrSet == _DescrSet, "Descriptor set (", _DescrSet, ") exceeds maximum representable value");
+ // clang-format on
+ }
+
+ Uint32 CacheOffset(ResourceCacheContentType CacheType) const
+ {
+ return CacheType == ResourceCacheContentType::SRB ? SRBCacheOffset : StaticCacheOffset;
+ }
+
+ DescriptorType GetDescriptorType() const
+ {
+ return static_cast<DescriptorType>(DescrType);
+ }
+
+ bool IsImmutableSamplerAssigned() const
+ {
+ return ImtblSamplerAssigned != 0;
+ }
+
+ bool IsCombinedWithSampler() const
+ {
+ return SamplerInd != InvalidSamplerInd;
+ }
+};
+
+} // namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp
index a1513c03..d41c4c5e 100644
--- a/Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp
@@ -34,45 +34,32 @@
#include "EngineVkImplTraits.hpp"
#include "PipelineResourceSignatureBase.hpp"
+
+// ShaderVariableManagerVk, ShaderResourceCacheVk, and ShaderResourceBindingVkImpl
+// are required by PipelineResourceSignatureBase
+#include "ShaderResourceCacheVk.hpp"
+#include "ShaderVariableManagerVk.hpp"
+#include "ShaderResourceBindingVkImpl.hpp"
+
+#include "PipelineResourceAttribsVk.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
#include "SRBMemoryAllocator.hpp"
-#include "ShaderResourceCacheCommon.hpp"
namespace Diligent
{
class RenderDeviceVkImpl;
-class ShaderResourceCacheVk;
class ShaderVariableManagerVk;
struct SPIRVShaderResourceAttribs;
-enum class DescriptorType : Uint8
-{
- Sampler,
- CombinedImageSampler,
- SeparateImage,
- StorageImage,
- UniformTexelBuffer,
- StorageTexelBuffer,
- StorageTexelBuffer_ReadOnly,
- UniformBuffer,
- UniformBufferDynamic,
- StorageBuffer,
- StorageBuffer_ReadOnly,
- StorageBufferDynamic,
- StorageBufferDynamic_ReadOnly,
- InputAttachment,
- AccelerationStructure,
- Count,
- Unknown = 0xFF,
-};
-
/// Implementation of the Diligent::PipelineResourceSignatureVkImpl class
class PipelineResourceSignatureVkImpl final : public PipelineResourceSignatureBase<EngineVkImplTraits>
{
public:
using TPipelineResourceSignatureBase = PipelineResourceSignatureBase<EngineVkImplTraits>;
+ using ResourceAttribs = PipelineResourceAttribsVk;
+
// Descriptor set identifier (this is not the descriptor set index in the set layout!)
enum DESCRIPTOR_SET_ID : size_t
{
@@ -88,6 +75,8 @@ public:
// Static/mutable and dynamic descriptor sets
static constexpr Uint32 MAX_DESCRIPTOR_SETS = DESCRIPTOR_SET_ID_NUM_SETS;
+ static_assert(ResourceAttribs::MaxDescriptorSets >= MAX_DESCRIPTOR_SETS, "Not enough bits to store descriptor set index");
+
PipelineResourceSignatureVkImpl(IReferenceCounters* pRefCounters,
RenderDeviceVkImpl* pDevice,
const PipelineResourceSignatureDesc& Desc,
@@ -103,75 +92,6 @@ public:
return (HasDescriptorSet(DESCRIPTOR_SET_ID_STATIC_MUTABLE) ? 1 : 0) + (HasDescriptorSet(DESCRIPTOR_SET_ID_DYNAMIC) ? 1 : 0);
}
- // sizeof(ResourceAttribs) == 16, x64
- struct ResourceAttribs
- {
- private:
- static constexpr Uint32 _BindingIndexBits = 16;
- static constexpr Uint32 _SamplerIndBits = 16;
- static constexpr Uint32 _ArraySizeBits = 26;
- static constexpr Uint32 _DescrTypeBits = 4;
- static constexpr Uint32 _DescrSetBits = 1;
- static constexpr Uint32 _SamplerAssignedBits = 1;
-
- static_assert((_BindingIndexBits + _ArraySizeBits + _SamplerIndBits + _DescrTypeBits + _DescrSetBits + _SamplerAssignedBits) % 32 == 0, "Bits are not optimally packed");
-
- static_assert((1u << _DescrTypeBits) >= static_cast<Uint32>(DescriptorType::Count), "Not enough bits to store DescriptorType values");
- static_assert((1u << _DescrSetBits) >= MAX_DESCRIPTOR_SETS, "Not enough bits to store descriptor set index");
- static_assert((1u << _BindingIndexBits) >= MAX_RESOURCES_IN_SIGNATURE, "Not enough bits to store resource binding index");
- static_assert((1u << _SamplerIndBits) >= MAX_RESOURCES_IN_SIGNATURE, "Not enough bits to store sampler resource index");
-
- public:
- static constexpr Uint32 InvalidSamplerInd = (1u << _SamplerIndBits) - 1;
-
- // clang-format off
- const Uint32 BindingIndex : _BindingIndexBits; // Binding in the descriptor set
- const Uint32 SamplerInd : _SamplerIndBits; // Index of the assigned sampler in m_Desc.Resources and m_pResourceAttribs
- const Uint32 ArraySize : _ArraySizeBits; // Array size
- const Uint32 DescrType : _DescrTypeBits; // Descriptor type (DescriptorType)
- const Uint32 DescrSet : _DescrSetBits; // Descriptor set (0 or 1)
- const Uint32 ImtblSamplerAssigned : _SamplerAssignedBits; // Immutable sampler flag
-
- const Uint32 SRBCacheOffset; // Offset in the SRB resource cache
- const Uint32 StaticCacheOffset; // Offset in the static resource cache
- // clang-format on
-
- ResourceAttribs(Uint32 _BindingIndex,
- Uint32 _SamplerInd,
- Uint32 _ArraySize,
- DescriptorType _DescrType,
- Uint32 _DescrSet,
- bool _ImtblSamplerAssigned,
- Uint32 _SRBCacheOffset,
- Uint32 _StaticCacheOffset) noexcept :
- // clang-format off
- BindingIndex {_BindingIndex },
- SamplerInd {_SamplerInd },
- ArraySize {_ArraySize },
- DescrType {static_cast<Uint32>(_DescrType)},
- DescrSet {_DescrSet },
- ImtblSamplerAssigned {_ImtblSamplerAssigned ? 1u : 0u},
- SRBCacheOffset {_SRBCacheOffset },
- StaticCacheOffset {_StaticCacheOffset }
- // clang-format on
- {
- VERIFY(BindingIndex == _BindingIndex, "Binding index (", _BindingIndex, ") exceeds maximum representable value");
- VERIFY(ArraySize == _ArraySize, "Array size (", _ArraySize, ") exceeds maximum representable value");
- VERIFY(SamplerInd == _SamplerInd, "Sampler index (", _SamplerInd, ") exceeds maximum representable value");
- VERIFY(GetDescriptorType() == _DescrType, "Descriptor type (", static_cast<Uint32>(_DescrType), ") exceeds maximum representable value");
- VERIFY(DescrSet == _DescrSet, "Descriptor set (", _DescrSet, ") exceeds maximum representable value");
- }
-
- Uint32 CacheOffset(ResourceCacheContentType CacheType) const
- {
- return CacheType == ResourceCacheContentType::SRB ? SRBCacheOffset : StaticCacheOffset;
- }
-
- DescriptorType GetDescriptorType() const { return static_cast<DescriptorType>(DescrType); }
- bool IsImmutableSamplerAssigned() const { return ImtblSamplerAssigned != 0; }
- bool IsCombinedWithSampler() const { return SamplerInd != InvalidSamplerInd; }
- };
-
const ResourceAttribs& GetResourceAttribs(Uint32 ResIndex) const
{
VERIFY_EXPR(ResIndex < m_Desc.NumResources);
@@ -196,24 +116,6 @@ public:
bool HasDescriptorSet(DESCRIPTOR_SET_ID SetId) const { return m_VkDescrSetLayouts[SetId] != VK_NULL_HANDLE; }
- /// Implementation of IPipelineResourceSignature::CreateShaderResourceBinding.
- virtual void DILIGENT_CALL_TYPE CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding,
- bool InitStaticResources) override final;
-
- /// Implementation of IPipelineResourceSignature::GetStaticVariableByName.
- virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetStaticVariableByName(SHADER_TYPE ShaderType, const Char* Name) override final;
-
- /// Implementation of IPipelineResourceSignature::GetStaticVariableByIndex.
- virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetStaticVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
-
- /// Implementation of IPipelineResourceSignature::GetStaticVariableCount.
- virtual Uint32 DILIGENT_CALL_TYPE GetStaticVariableCount(SHADER_TYPE ShaderType) const override final;
-
- /// Implementation of IPipelineResourceSignature::BindStaticResources.
- virtual void DILIGENT_CALL_TYPE BindStaticResources(Uint32 ShaderFlags,
- IResourceMapping* pResourceMapping,
- Uint32 Flags) override final;
-
/// Implementation of IPipelineResourceSignature::IsCompatibleWith.
virtual bool DILIGENT_CALL_TYPE IsCompatibleWith(const IPipelineResourceSignature* pPRS) const override final
{
diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp
index f36611df..18b23f91 100644
--- a/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.hpp
@@ -33,18 +33,17 @@
#include <array>
#include <memory>
-#include "RenderDeviceVk.h"
+#include "EngineVkImplTraits.hpp"
#include "PipelineStateVk.h"
#include "PipelineStateBase.hpp"
-#include "ShaderVariableVk.hpp"
+#include "PipelineResourceSignatureVkImpl.hpp" // Required by PipelineStateBase
+
+#include "ShaderVariableManagerVk.hpp"
#include "FixedBlockMemoryAllocator.hpp"
#include "SRBMemoryAllocator.hpp"
#include "PipelineLayoutVk.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
#include "VulkanUtilities/VulkanCommandBuffer.hpp"
-#include "RenderDeviceVkImpl.hpp"
-#include "PipelineLayoutVk.hpp"
-#include "PipelineResourceSignatureVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/QueryVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/QueryVkImpl.hpp
index cc3919c9..76f94f85 100644
--- a/Graphics/GraphicsEngineVulkan/include/QueryVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/QueryVkImpl.hpp
@@ -32,9 +32,9 @@
#include <array>
+#include "EngineVkImplTraits.hpp"
#include "QueryVk.h"
#include "QueryBase.hpp"
-#include "RenderDeviceVkImpl.hpp"
#include "QueryManagerVk.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp
index 71294e24..d9145764 100644
--- a/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.hpp
@@ -33,24 +33,25 @@
#include "EngineVkImplTraits.hpp"
+#include "CommandQueueVk.h"
+
#include "RenderDeviceBase.hpp"
#include "RenderDeviceNextGenBase.hpp"
-#include "DescriptorPoolManager.hpp"
-#include "VulkanDynamicHeap.hpp"
-#include "Atomics.hpp"
-#include "CommandQueueVk.h"
+
#include "VulkanUtilities/VulkanInstance.hpp"
#include "VulkanUtilities/VulkanPhysicalDevice.hpp"
#include "VulkanUtilities/VulkanCommandBufferPool.hpp"
#include "VulkanUtilities/VulkanLogicalDevice.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
#include "VulkanUtilities/VulkanMemoryManager.hpp"
+
+#include "DescriptorPoolManager.hpp"
+#include "VulkanDynamicHeap.hpp"
#include "VulkanUploadHeap.hpp"
#include "FramebufferCache.hpp"
#include "RenderPassCache.hpp"
#include "CommandPoolManager.hpp"
#include "DXCompiler.hpp"
-#include "PipelineResourceSignatureVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/RenderPassCache.hpp b/Graphics/GraphicsEngineVulkan/include/RenderPassCache.hpp
index e8f7e177..0348501e 100644
--- a/Graphics/GraphicsEngineVulkan/include/RenderPassCache.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/RenderPassCache.hpp
@@ -32,6 +32,7 @@
#include <unordered_map>
#include <mutex>
+
#include "GraphicsTypes.h"
#include "Constants.h"
#include "HashUtils.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.hpp
index 5821e02e..5a74d660 100644
--- a/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.hpp
@@ -30,11 +30,10 @@
/// \file
/// Declaration of Diligent::SamplerVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "SamplerVk.h"
-#include "RenderDeviceVk.h"
#include "SamplerBase.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
-#include "RenderDeviceVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderBindingTableVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/ShaderBindingTableVkImpl.hpp
index 5291f857..d8533118 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderBindingTableVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderBindingTableVkImpl.hpp
@@ -30,8 +30,7 @@
/// \file
/// Definition of the Diligent::ShaderBindingTableVkImpl class
-#include "RenderDeviceVk.h"
-#include "RenderDeviceVkImpl.hpp"
+#include "EngineVkImplTraits.hpp"
#include "ShaderBindingTableVk.h"
#include "ShaderBindingTableBase.hpp"
#include "TopLevelASVkImpl.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.hpp
index e77da610..1b448b6a 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.hpp
@@ -30,13 +30,14 @@
/// \file
/// Declaration of Diligent::ShaderResourceBindingVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "ShaderResourceBindingVk.h"
-#include "RenderDeviceVk.h"
#include "ShaderResourceBindingBase.hpp"
#include "ShaderBase.hpp"
+
+// ShaderVariableManagerVk and ShaderResourceCacheVk are required by ShaderResourceBindingBase
#include "ShaderResourceCacheVk.hpp"
-#include "ShaderVariableVk.hpp"
-#include "PipelineResourceSignatureVkImpl.hpp"
+#include "ShaderVariableManagerVk.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.hpp b/Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.hpp
index 7c8621c0..aac66247 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.hpp
@@ -59,8 +59,8 @@
#include "DescriptorPoolManager.hpp"
#include "SPIRVShaderResources.hpp"
#include "BufferVkImpl.hpp"
-#include "PipelineResourceSignatureVkImpl.hpp"
#include "ShaderResourceCacheCommon.hpp"
+#include "PipelineResourceAttribsVk.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderVariableVk.hpp b/Graphics/GraphicsEngineVulkan/include/ShaderVariableManagerVk.hpp
index 6a268f13..b5d0c687 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderVariableVk.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderVariableManagerVk.hpp
@@ -63,7 +63,7 @@
#include "ShaderResourceVariableBase.hpp"
#include "ShaderResourceCacheVk.hpp"
-#include "PipelineResourceSignatureVkImpl.hpp"
+#include "PipelineResourceAttribsVk.hpp"
namespace Diligent
{
@@ -107,20 +107,13 @@ public:
private:
friend ShaderVariableVkImpl;
- using ResourceAttribs = PipelineResourceSignatureVkImpl::ResourceAttribs;
+ using ResourceAttribs = PipelineResourceAttribsVk;
Uint32 GetVariableIndex(const ShaderVariableVkImpl& Variable);
- const PipelineResourceDesc& GetResourceDesc(Uint32 Index) const
- {
- VERIFY_EXPR(m_pSignature);
- return m_pSignature->GetResourceDesc(Index);
- }
- const ResourceAttribs& GetAttribs(Uint32 Index) const
- {
- VERIFY_EXPR(m_pSignature);
- return m_pSignature->GetResourceAttribs(Index);
- }
+ // These two methods can't be implemented in the header because they depend on PipelineResourceSignatureVkImpl
+ const PipelineResourceDesc& GetResourceDesc(Uint32 Index) const;
+ const ResourceAttribs& GetAttribs(Uint32 Index) const;
template <typename HandlerType>
static void ProcessSignatureResources(const PipelineResourceSignatureVkImpl& Signature,
@@ -197,20 +190,16 @@ public:
return m_ParentManager.GetVariableIndex(*this);
}
- virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
- {
- return m_ParentManager.m_pSignature->IsBound(ArrayIndex, m_ResIndex, m_ParentManager.m_ResourceCache);
- }
+ // This method can't be implemented in the header because it depends on PipelineResourceSignatureVkImpl
+ virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final;
const PipelineResourceDesc& GetDesc() const { return m_ParentManager.GetResourceDesc(m_ResIndex); }
- void BindResource(IDeviceObject* pObj, Uint32 ArrayIndex) const
- {
- m_ParentManager.m_pSignature->BindResource(pObj, ArrayIndex, m_ResIndex, m_ParentManager.m_ResourceCache);
- }
+ // This method can't be implemented in the header because it depends on PipelineResourceSignatureVkImpl
+ void BindResource(IDeviceObject* pObj, Uint32 ArrayIndex) const;
private:
- using ResourceAttribs = PipelineResourceSignatureVkImpl::ResourceAttribs;
+ using ResourceAttribs = PipelineResourceAttribsVk;
const ResourceAttribs& GetAttribs() const { return m_ParentManager.GetAttribs(m_ResIndex); }
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.hpp
index f8b63b95..60c464d6 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.hpp
@@ -30,11 +30,10 @@
/// \file
/// Declaration of Diligent::ShaderVkImpl class
-#include "RenderDeviceVk.h"
+#include "EngineVkImplTraits.hpp"
#include "ShaderVk.h"
#include "ShaderBase.hpp"
#include "SPIRVShaderResources.hpp"
-#include "RenderDeviceVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp
index a083c48c..94a6d5df 100644
--- a/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp
@@ -30,6 +30,7 @@
/// \file
/// Declaration of Diligent::SwapChainVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "SwapChainVk.h"
#include "SwapChainBase.hpp"
#include "VulkanUtilities/VulkanInstance.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp
index 67806c8b..271fee6c 100644
--- a/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp
@@ -30,11 +30,10 @@
/// \file
/// Declaration of Diligent::TextureViewVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "TextureViewVk.h"
-#include "RenderDeviceVk.h"
#include "TextureViewBase.hpp"
#include "VulkanUtilities/VulkanObjectWrappers.hpp"
-#include "RenderDeviceVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.hpp
index 9f5cfb84..7b20f577 100644
--- a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.hpp
@@ -30,12 +30,11 @@
/// \file
/// Declaration of Diligent::TextureVkImpl class
+#include "EngineVkImplTraits.hpp"
#include "TextureVk.h"
-#include "RenderDeviceVk.h"
#include "TextureBase.hpp"
#include "TextureViewVkImpl.hpp"
#include "VulkanUtilities/VulkanMemoryManager.hpp"
-#include "RenderDeviceVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/include/TopLevelASVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/TopLevelASVkImpl.hpp
index 7f34104d..c8525039 100644
--- a/Graphics/GraphicsEngineVulkan/include/TopLevelASVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/TopLevelASVkImpl.hpp
@@ -30,8 +30,7 @@
/// \file
/// Definition of the Diligent::TopLevelASVkImpl class
-#include "RenderDeviceVk.h"
-#include "RenderDeviceVkImpl.hpp"
+#include "EngineVkImplTraits.hpp"
#include "TopLevelASVk.h"
#include "TopLevelASBase.hpp"
#include "BottomLevelASVkImpl.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/src/BottomLevelASVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/BottomLevelASVkImpl.cpp
index c0f7ed2b..08154083 100644
--- a/Graphics/GraphicsEngineVulkan/src/BottomLevelASVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/BottomLevelASVkImpl.cpp
@@ -27,6 +27,7 @@
#include "pch.h"
#include "BottomLevelASVkImpl.hpp"
+#include "RenderDeviceVkImpl.hpp"
#include "VulkanTypeConversions.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp
index bd3833dd..3b725dd8 100644
--- a/Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp
@@ -25,10 +25,14 @@
* of the possibility of such damages.
*/
-#include <thread>
#include "pch.h"
+
#include "CommandQueueVkImpl.hpp"
+#include <thread>
+
+#include "RenderDeviceVkImpl.hpp"
+
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index 0ac9c0fb..91faf339 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -27,18 +27,20 @@
#include "pch.h"
+#include "DeviceContextVkImpl.hpp"
+
#include <sstream>
#include <vector>
#include "RenderDeviceVkImpl.hpp"
-#include "DeviceContextVkImpl.hpp"
#include "PipelineStateVkImpl.hpp"
#include "TextureVkImpl.hpp"
#include "BufferVkImpl.hpp"
#include "RenderPassVkImpl.hpp"
+#include "FenceVkImpl.hpp"
+
#include "VulkanTypeConversions.hpp"
#include "CommandListVkImpl.hpp"
-#include "FenceVkImpl.hpp"
#include "GraphicsAccessories.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp
index fa4c4536..9170516a 100644
--- a/Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp
@@ -28,8 +28,8 @@
#include "pch.h"
#include "FenceVkImpl.hpp"
-#include "EngineMemory.h"
#include "RenderDeviceVkImpl.hpp"
+#include "EngineMemory.h"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/src/FramebufferCache.cpp b/Graphics/GraphicsEngineVulkan/src/FramebufferCache.cpp
index 9dfbf8a0..e8d535fe 100644
--- a/Graphics/GraphicsEngineVulkan/src/FramebufferCache.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/FramebufferCache.cpp
@@ -27,8 +27,8 @@
#include "pch.h"
#include "FramebufferCache.hpp"
-#include "HashUtils.hpp"
#include "RenderDeviceVkImpl.hpp"
+#include "HashUtils.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/src/FramebufferVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/FramebufferVkImpl.cpp
index 88b7f2d8..407be488 100644
--- a/Graphics/GraphicsEngineVulkan/src/FramebufferVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/FramebufferVkImpl.cpp
@@ -27,13 +27,16 @@
#include "pch.h"
+#include "FramebufferVkImpl.hpp"
+
#include <vector>
-#include "FramebufferVkImpl.hpp"
-#include "EngineMemory.h"
+#include "RenderDeviceVkImpl.hpp"
#include "RenderPassVkImpl.hpp"
#include "TextureViewVkImpl.hpp"
+#include "EngineMemory.h"
+
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp b/Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp
index f46dd27d..43ab5814 100644
--- a/Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp
@@ -26,12 +26,16 @@
*/
#include "pch.h"
-#include <sstream>
+
#include "GenerateMipsVkHelper.hpp"
+
+#include <sstream>
+
#include "RenderDeviceVkImpl.hpp"
#include "DeviceContextVkImpl.hpp"
#include "TextureViewVkImpl.hpp"
#include "TextureVkImpl.hpp"
+
#include "PlatformMisc.hpp"
#include "VulkanTypeConversions.hpp"
#include "../../GraphicsTools/interface/ShaderMacroHelper.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineLayoutVk.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineLayoutVk.cpp
index 14183e97..35957ca7 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineLayoutVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineLayoutVk.cpp
@@ -27,14 +27,16 @@
#include "pch.h"
+#include "PipelineLayoutVk.hpp"
+
#include <algorithm>
#include <limits>
-#include "PipelineLayoutVk.hpp"
#include "RenderDeviceVkImpl.hpp"
+#include "PipelineResourceSignatureVkImpl.hpp"
+
#include "VulkanTypeConversions.hpp"
#include "StringTools.hpp"
-#include "PipelineResourceSignatureVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp
index 799d98db..66502634 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp
@@ -26,13 +26,15 @@
*/
#include "pch.h"
+
#include "PipelineResourceSignatureVkImpl.hpp"
-#include "ShaderResourceBindingVkImpl.hpp"
+
#include "RenderDeviceVkImpl.hpp"
-#include "VulkanTypeConversions.hpp"
#include "SamplerVkImpl.hpp"
#include "TextureViewVkImpl.hpp"
#include "TopLevelASVkImpl.hpp"
+
+#include "VulkanTypeConversions.hpp"
#include "DynamicLinearAllocator.hpp"
#include "SPIRVShaderResources.hpp"
@@ -619,34 +621,6 @@ bool PipelineResourceSignatureVkImpl::IsCompatibleWith(const PipelineResourceSig
return true;
}
-void PipelineResourceSignatureVkImpl::CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding,
- bool InitStaticResources)
-{
- CreateShaderResourceBindingImpl(ppShaderResourceBinding, InitStaticResources);
-}
-
-Uint32 PipelineResourceSignatureVkImpl::GetStaticVariableCount(SHADER_TYPE ShaderType) const
-{
- return GetStaticVariableCountImpl(ShaderType);
-}
-
-IShaderResourceVariable* PipelineResourceSignatureVkImpl::GetStaticVariableByName(SHADER_TYPE ShaderType, const Char* Name)
-{
- return GetStaticVariableByNameImpl(ShaderType, Name);
-}
-
-IShaderResourceVariable* PipelineResourceSignatureVkImpl::GetStaticVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index)
-{
- return GetStaticVariableByIndexImpl(ShaderType, Index);
-}
-
-void PipelineResourceSignatureVkImpl::BindStaticResources(Uint32 ShaderFlags,
- IResourceMapping* pResMapping,
- Uint32 Flags)
-{
- BindStaticResourcesImpl(ShaderFlags, pResMapping, Flags);
-}
-
void PipelineResourceSignatureVkImpl::InitSRBResourceCache(ShaderResourceCacheVk& ResourceCache,
IMemoryAllocator& CacheMemAllocator,
const char* DbgPipelineName) const
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
index 364d6f1b..5298d20d 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
@@ -27,19 +27,20 @@
#include "pch.h"
+#include "PipelineStateVkImpl.hpp"
+
#include <array>
#include <unordered_set>
-#include "PipelineStateVkImpl.hpp"
-#include "ShaderVkImpl.hpp"
-#include "VulkanTypeConversions.hpp"
#include "RenderDeviceVkImpl.hpp"
#include "DeviceContextVkImpl.hpp"
+#include "ShaderVkImpl.hpp"
#include "RenderPassVkImpl.hpp"
#include "ShaderResourceBindingVkImpl.hpp"
+
+#include "VulkanTypeConversions.hpp"
#include "EngineMemory.h"
#include "StringTools.hpp"
-#include "ShaderResourceBindingVkImpl.hpp"
#if !DILIGENT_NO_HLSL
diff --git a/Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp b/Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp
index 1424024e..44cb7967 100644
--- a/Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp
@@ -26,8 +26,11 @@
*/
#include "pch.h"
-#include <algorithm>
+
#include "QueryManagerVk.hpp"
+
+#include <algorithm>
+
#include "RenderDeviceVkImpl.hpp"
#include "GraphicsAccessories.hpp"
#include "VulkanUtilities/VulkanCommandBuffer.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/src/QueryVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/QueryVkImpl.cpp
index 36cc0d37..59391744 100644
--- a/Graphics/GraphicsEngineVulkan/src/QueryVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/QueryVkImpl.cpp
@@ -28,9 +28,9 @@
#include "pch.h"
#include "QueryVkImpl.hpp"
-#include "EngineMemory.h"
#include "RenderDeviceVkImpl.hpp"
#include "DeviceContextVkImpl.hpp"
+#include "EngineMemory.h"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
index cf66b3ce..8debcd97 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
@@ -26,11 +26,12 @@
*/
#include "pch.h"
+
#include "RenderDeviceVkImpl.hpp"
+
#include "PipelineStateVkImpl.hpp"
#include "ShaderVkImpl.hpp"
#include "TextureVkImpl.hpp"
-#include "VulkanTypeConversions.hpp"
#include "SamplerVkImpl.hpp"
#include "BufferVkImpl.hpp"
#include "ShaderResourceBindingVkImpl.hpp"
@@ -43,6 +44,8 @@
#include "TopLevelASVkImpl.hpp"
#include "ShaderBindingTableVkImpl.hpp"
#include "PipelineResourceSignatureVkImpl.hpp"
+
+#include "VulkanTypeConversions.hpp"
#include "EngineMemory.h"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp b/Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp
index 3becabff..5f75e6eb 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp
@@ -26,8 +26,11 @@
*/
#include "pch.h"
-#include <sstream>
+
#include "RenderPassCache.hpp"
+
+#include <sstream>
+
#include "RenderDeviceVkImpl.hpp"
#include "PipelineStateVkImpl.hpp"
#include "RenderPassVkImpl.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderBindingTableVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderBindingTableVkImpl.cpp
index d3773cf1..da1024c7 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderBindingTableVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderBindingTableVkImpl.cpp
@@ -26,7 +26,9 @@
*/
#include "pch.h"
+
#include "ShaderBindingTableVkImpl.hpp"
+#include "RenderDeviceVkImpl.hpp"
#include "BufferVkImpl.hpp"
#include "VulkanTypeConversions.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
index 797718fd..0d5e5396 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
@@ -27,9 +27,9 @@
#include "pch.h"
#include "ShaderResourceBindingVkImpl.hpp"
+#include "RenderDeviceVkImpl.hpp"
#include "PipelineStateVkImpl.hpp"
#include "ShaderVkImpl.hpp"
-#include "RenderDeviceVkImpl.hpp"
#include "FixedLinearAllocator.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp
index 4b2efdc4..c4c40f7c 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp
@@ -28,12 +28,14 @@
#include "pch.h"
#include "ShaderResourceCacheVk.hpp"
+
#include "DeviceContextVkImpl.hpp"
#include "BufferViewVkImpl.hpp"
#include "TextureViewVkImpl.hpp"
#include "TextureVkImpl.hpp"
#include "SamplerVkImpl.hpp"
#include "TopLevelASVkImpl.hpp"
+
#include "VulkanTypeConversions.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVariableVk.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVariableManagerVk.cpp
index b56b3adc..71d2811a 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderVariableVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderVariableManagerVk.cpp
@@ -27,8 +27,8 @@
#include "pch.h"
-#include "ShaderVariableVk.hpp"
-#include "ShaderResourceVariableBase.hpp"
+#include "ShaderVariableManagerVk.hpp"
+#include "RenderDeviceVkImpl.hpp"
#include "PipelineResourceSignatureVkImpl.hpp"
namespace Diligent
@@ -183,6 +183,19 @@ Uint32 ShaderVariableManagerVk::GetVariableIndex(const ShaderVariableVkImpl& Var
}
}
+const PipelineResourceDesc& ShaderVariableManagerVk::GetResourceDesc(Uint32 Index) const
+{
+ VERIFY_EXPR(m_pSignature);
+ return m_pSignature->GetResourceDesc(Index);
+}
+
+const ShaderVariableManagerVk::ResourceAttribs& ShaderVariableManagerVk::GetAttribs(Uint32 Index) const
+{
+ VERIFY_EXPR(m_pSignature);
+ return m_pSignature->GetResourceAttribs(Index);
+}
+
+
void ShaderVariableManagerVk::BindResources(IResourceMapping* pResourceMapping, Uint32 Flags) const
{
if (!pResourceMapping)
@@ -211,4 +224,14 @@ void ShaderVariableVkImpl::SetArray(IDeviceObject* const* ppObjects,
BindResource(ppObjects[Elem], FirstElement + Elem);
}
+bool ShaderVariableVkImpl::IsBound(Uint32 ArrayIndex) const
+{
+ return m_ParentManager.m_pSignature->IsBound(ArrayIndex, m_ResIndex, m_ParentManager.m_ResourceCache);
+}
+
+void ShaderVariableVkImpl::BindResource(IDeviceObject* pObj, Uint32 ArrayIndex) const
+{
+ m_ParentManager.m_pSignature->BindResource(pObj, ArrayIndex, m_ResIndex, m_ParentManager.m_ResourceCache);
+}
+
} // namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
index 740b66de..90a7cf9c 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
@@ -25,11 +25,13 @@
* of the possibility of such damages.
*/
-#include <array>
-#include <cctype>
#include "pch.h"
#include "ShaderVkImpl.hpp"
+
+#include <array>
+#include <cctype>
+
#include "RenderDeviceVkImpl.hpp"
#include "DataBlobImpl.hpp"
#include "GLSLUtils.hpp"
diff --git a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
index bd7c0d55..5135067b 100644
--- a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
@@ -29,8 +29,8 @@
#include "SwapChainVkImpl.hpp"
#include "RenderDeviceVkImpl.hpp"
#include "DeviceContextVkImpl.hpp"
-#include "VulkanTypeConversions.hpp"
#include "TextureVkImpl.hpp"
+#include "VulkanTypeConversions.hpp"
#include "EngineMemory.h"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp
index eeeb6002..03356eef 100644
--- a/Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp
@@ -27,8 +27,8 @@
#include "pch.h"
#include "TextureViewVkImpl.hpp"
-#include "DeviceContextVkImpl.hpp"
#include "RenderDeviceVkImpl.hpp"
+#include "DeviceContextVkImpl.hpp"
namespace Diligent
{
diff --git a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
index 8cf3dbee..6b4d538e 100644
--- a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
@@ -29,7 +29,6 @@
#include "TextureVkImpl.hpp"
#include "RenderDeviceVkImpl.hpp"
#include "DeviceContextVkImpl.hpp"
-#include "VulkanTypeConversions.hpp"
#include "TextureViewVkImpl.hpp"
#include "VulkanTypeConversions.hpp"
#include "EngineMemory.h"
diff --git a/Graphics/GraphicsEngineVulkan/src/TopLevelASVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/TopLevelASVkImpl.cpp
index c427fc79..2c0de29a 100644
--- a/Graphics/GraphicsEngineVulkan/src/TopLevelASVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/TopLevelASVkImpl.cpp
@@ -27,6 +27,7 @@
#include "pch.h"
#include "TopLevelASVkImpl.hpp"
+#include "RenderDeviceVkImpl.hpp"
#include "VulkanTypeConversions.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp
index 0eb4fcf4..c2a9f6e6 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp
@@ -26,9 +26,12 @@
*/
#include "pch.h"
+
+#include "VulkanDynamicHeap.hpp"
+
#include <chrono>
#include <thread>
-#include "VulkanDynamicHeap.hpp"
+
#include "RenderDeviceVkImpl.hpp"
namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp
index 56a4a871..22e8aa10 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp
@@ -26,10 +26,12 @@
*/
#include "pch.h"
+
+#include "VulkanTypeConversions.hpp"
+
#include <unordered_map>
#include <array>
-#include "VulkanTypeConversions.hpp"
#include "PlatformMisc.hpp"
#include "Align.hpp"
#include "BasicMath.hpp"