From c7391919d2e9d34e7f4fc18e8ffc174a9eabfb5e Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 4 Oct 2018 21:51:33 -0700 Subject: Reworked context pool management in D3D12 --- Graphics/GLSLTools/src/SPIRVShaderResources.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Graphics/GLSLTools') diff --git a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp index c4256b9b..eda4a18f 100644 --- a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp +++ b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp @@ -91,7 +91,6 @@ SPIRVShaderResources::SPIRVShaderResources(IMemoryAllocator& Allocator, IRenderDevice* pRenderDevice, std::vector spirv_binary, const ShaderDesc& shaderDesc) : - m_MemoryBuffer(nullptr, STDDeleterRawMem(Allocator)), m_ShaderType(shaderDesc.ShaderType) { // https://github.com/KhronosGroup/SPIRV-Cross/wiki/Reflection-API-user-guide @@ -327,8 +326,6 @@ void SPIRVShaderResources::Initialize(IMemoryAllocator& Allocator, Uint32 NumStaticSamplers, size_t ResourceNamesPoolSize) { - VERIFY(&m_MemoryBuffer.get_deleter().m_Allocator == &Allocator, "Incosistent allocators provided"); - static constexpr OffsetType UniformBufferOffset = 0; const auto MaxOffset = static_cast(std::numeric_limits::max()); @@ -373,7 +370,7 @@ void SPIRVShaderResources::Initialize(IMemoryAllocator& Allocator, if (MemorySize) { auto *pRawMem = Allocator.Allocate(MemorySize, "Memory for shader resources", __FILE__, __LINE__); - m_MemoryBuffer.reset(pRawMem); + m_MemoryBuffer = std::unique_ptr>(pRawMem, Allocator); char* NamesPool = reinterpret_cast(m_MemoryBuffer.get()) + m_TotalResources * sizeof(SPIRVShaderResourceAttribs) + m_NumStaticSamplers * sizeof(SamplerPtrType); -- cgit v1.2.3