From 1dfd5042779a493285c397d46f8d903d67c9f972 Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 8 Mar 2021 10:27:35 -0800 Subject: Resource singature: moved allocation of static resource cache and var managers to PipelineResourceSignatureBase --- .../src/PipelineResourceSignatureVkImpl.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp index 38520c8a..421bbe26 100644 --- a/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp @@ -229,12 +229,12 @@ PipelineResourceSignatureVkImpl::PipelineResourceSignatureVkImpl(IReferenceCount try { auto& RawAllocator{GetRawAllocator()}; - auto MemPool = ReserveSpace(RawAllocator, Desc, - [&Desc](FixedLinearAllocator& MemPool) // - { - MemPool.AddSpace(Desc.NumResources); - MemPool.AddSpace(Desc.NumImmutableSamplers); - }); + auto MemPool = AllocateInternalObjects(RawAllocator, Desc, + [&Desc](FixedLinearAllocator& MemPool) // + { + MemPool.AddSpace(Desc.NumResources); + MemPool.AddSpace(Desc.NumImmutableSamplers); + }); m_pResourceAttribs = MemPool.Allocate(m_Desc.NumResources); m_ImmutableSamplers = MemPool.ConstructArray(m_Desc.NumImmutableSamplers); @@ -242,9 +242,6 @@ PipelineResourceSignatureVkImpl::PipelineResourceSignatureVkImpl(IReferenceCount const auto NumStaticResStages = GetNumStaticResStages(); if (NumStaticResStages > 0) { - m_pStaticResCache = MemPool.Construct(ResourceCacheContentType::Signature); - m_StaticVarsMgrs = MemPool.ConstructArray(NumStaticResStages, std::ref(*this), std::ref(*m_pStaticResCache)); - Uint32 StaticResourceCount = 0; // The total number of static resources in all stages // accounting for array sizes. for (Uint32 i = 0; i < Desc.NumResources; ++i) -- cgit v1.2.3