From 900565ad1256074909c971ea49478473d8587880 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 7 Mar 2021 20:25:30 -0800 Subject: Moved m_SRBMemAllocator to PipelineResourceSignatureBase --- .../GraphicsEngine/include/PipelineResourceSignatureBase.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngine') 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 FixedLinearAllocator ReserveSpace(IMemoryAllocator& RawAllocator, @@ -569,6 +576,9 @@ protected: std::array 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 -- cgit v1.2.3