diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-04-13 02:34:18 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-04-13 02:34:18 +0000 |
| commit | 321dfe299cd3b15bd0216113068f13dfa4b99cf0 (patch) | |
| tree | fcbd6d410bdc1bb5b659471350dddf1e71e615ce /Graphics/GraphicsEngineNextGenBase | |
| parent | Optimized memory layout of ObjectBase<> (reduced size by 40 bytes on msvc x64) (diff) | |
| download | DiligentCore-321dfe299cd3b15bd0216113068f13dfa4b99cf0.tar.gz DiligentCore-321dfe299cd3b15bd0216113068f13dfa4b99cf0.zip | |
Updated ALLOCATE macros to make it more convenient
Diffstat (limited to 'Graphics/GraphicsEngineNextGenBase')
| -rw-r--r-- | Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h index 10e2baeb..3f7b42d1 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h @@ -34,6 +34,7 @@ #include "RefCntAutoPtr.h" #include "PlatformMisc.h" #include "ResourceReleaseQueue.h" +#include "EngineMemory.h" namespace Diligent { @@ -56,7 +57,7 @@ public: TBase (pRefCounters, RawMemAllocator, pEngineFactory, NumDeferredContexts, ObjectSizes), m_CmdQueueCount (CmdQueueCount) { - m_CommandQueues = reinterpret_cast<CommandQueue*>(ALLOCATE(this->m_RawMemAllocator, "Raw memory for the device command/release queues", sizeof(CommandQueue)*m_CmdQueueCount)); + m_CommandQueues = ALLOCATE(this->m_RawMemAllocator, "Raw memory for the device command/release queues", CommandQueue, m_CmdQueueCount); for(size_t q=0; q < m_CmdQueueCount; ++q) new(m_CommandQueues+q)CommandQueue(RefCntAutoPtr<CommandQueueType>(Queues[q]), this->m_RawMemAllocator); } |
