summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-03-08 04:25:30 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-03-19 00:38:17 +0000
commit900565ad1256074909c971ea49478473d8587880 (patch)
treed1cf6173fab1617df229aea374fa65e06de44f58 /Graphics/GraphicsEngine
parentUnified implementation of InitializeStaticSRBResources in D3D12, Vk and GL ba... (diff)
downloadDiligentCore-900565ad1256074909c971ea49478473d8587880.tar.gz
DiligentCore-900565ad1256074909c971ea49478473d8587880.zip
Moved m_SRBMemAllocator to PipelineResourceSignatureBase
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp b/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp
index ce849246..c2e407ee 100644
--- a/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp
+++ b/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp
@@ -43,6 +43,7 @@
#include "BasicMath.hpp"
#include "StringTools.hpp"
#include "PlatformMisc.hpp"
+#include "SRBMemoryAllocator.hpp"
namespace Diligent
{
@@ -104,7 +105,8 @@ public:
RenderDeviceImplType* pDevice,
const PipelineResourceSignatureDesc& Desc,
bool bIsDeviceInternal = false) :
- TDeviceObjectBase{pRefCounters, pDevice, Desc, bIsDeviceInternal}
+ TDeviceObjectBase{pRefCounters, pDevice, Desc, bIsDeviceInternal},
+ m_SRBMemAllocator{GetRawAllocator()}
{
// Don't read from m_Desc until it was allocated and copied in CopyDescription()
this->m_Desc.Resources = nullptr;
@@ -368,6 +370,11 @@ public:
return pSign0->IsCompatibleWith(pSign1);
}
+ SRBMemoryAllocator& GetSRBMemoryAllocator()
+ {
+ return m_SRBMemAllocator;
+ }
+
protected:
template <typename TReserveCustomData>
FixedLinearAllocator ReserveSpace(IMemoryAllocator& RawAllocator,
@@ -569,6 +576,9 @@ protected:
std::array<Int8, MAX_SHADERS_IN_PIPELINE> m_StaticResStageIndex = {-1, -1, -1, -1, -1, -1};
static_assert(MAX_SHADERS_IN_PIPELINE == 6, "Please update the initializer list above");
+ // Allocator for shader resource binding object instances.
+ SRBMemoryAllocator m_SRBMemAllocator;
+
#ifdef DILIGENT_DEBUG
bool m_IsDestructed = false;
#endif