diff options
| author | Egor <egor.yusov@gmail.com> | 2018-11-03 07:40:12 +0000 |
|---|---|---|
| committer | Egor <egor.yusov@gmail.com> | 2018-11-03 07:40:12 +0000 |
| commit | 0cb37acdadbe609f3e0d31c990f47c4ef9c8dd31 (patch) | |
| tree | 7665de2338d6b295c5c7e41c67f76e530afe24d9 /Graphics/GraphicsEngineNextGenBase | |
| parent | Fixed few linux build issues (diff) | |
| download | DiligentCore-0cb37acdadbe609f3e0d31c990f47c4ef9c8dd31.tar.gz DiligentCore-0cb37acdadbe609f3e0d31c990f47c4ef9c8dd31.zip | |
Fixed multiple linux build issues in Vk backend
Diffstat (limited to 'Graphics/GraphicsEngineNextGenBase')
3 files changed, 14 insertions, 8 deletions
diff --git a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h index aaf1a615..8e3e6fa1 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h @@ -64,7 +64,7 @@ protected: template<typename RenderDeviceImplType> void EndFrame(RenderDeviceImplType& RenderDeviceImpl) { - if (m_bIsDeferred) + if (this->m_bIsDeferred) { // For deferred context, reset submitted cmd queue mask m_SubmittedBuffersCmdQueueMask = 0; diff --git a/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h b/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h index 7f19dea6..16fcd8b0 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h +++ b/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h @@ -98,7 +98,11 @@ public: MasterBlockListBasedManager(IMemoryAllocator& Allocator, Uint32 Size) : m_AllocationsMgr(Size, Allocator) - {} + { +#ifdef DEVELOPMENT + m_MasterBlockCounter = 0; +#endif + } MasterBlockListBasedManager (const MasterBlockListBasedManager&) = delete; MasterBlockListBasedManager ( MasterBlockListBasedManager&&) = delete; @@ -176,7 +180,7 @@ private: VariableSizeAllocationsManager m_AllocationsMgr; #ifdef DEVELOPMENT - std::atomic_int32_t m_MasterBlockCounter = 0; + std::atomic_int32_t m_MasterBlockCounter; #endif }; diff --git a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h index 0af65ece..a271a882 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h @@ -71,9 +71,9 @@ public: FenceSize), m_CmdQueueCount(CmdQueueCount) { - m_CommandQueues = reinterpret_cast<CommandQueue*>(ALLOCATE(m_RawMemAllocator, "Raw memory for the device command/release queues", sizeof(CommandQueue)*m_CmdQueueCount)); + m_CommandQueues = reinterpret_cast<CommandQueue*>(ALLOCATE(this->m_RawMemAllocator, "Raw memory for the device command/release queues", sizeof(CommandQueue)*m_CmdQueueCount)); for(size_t q=0; q < m_CmdQueueCount; ++q) - new(m_CommandQueues+q)CommandQueue(RefCntAutoPtr<CommandQueueType>(Queues[q]), m_RawMemAllocator); + new(m_CommandQueues+q)CommandQueue(RefCntAutoPtr<CommandQueueType>(Queues[q]), this->m_RawMemAllocator); } ~RenderDeviceNextGenBase() @@ -282,7 +282,7 @@ protected: DEV_CHECK_ERR(Queue.ReleaseQueue.GetPendingReleaseResourceCount() == 0, "All resources must be released before destroying a command queue"); Queue.~CommandQueue(); } - m_RawMemAllocator.Free(m_CommandQueues); + this->m_RawMemAllocator.Free(m_CommandQueues); m_CommandQueues = nullptr; } } @@ -292,7 +292,9 @@ protected: CommandQueue(RefCntAutoPtr<CommandQueueType> _CmdQueue, IMemoryAllocator& Allocator)noexcept : CmdQueue (std::move(_CmdQueue)), ReleaseQueue(Allocator) - {} + { + NextCmdBufferNumber = 0; + } CommandQueue (const CommandQueue& rhs) = delete; CommandQueue ( CommandQueue&& rhs) = delete; @@ -300,7 +302,7 @@ protected: CommandQueue& operator = ( CommandQueue&& rhs) = delete; std::mutex Mtx; - Atomics::Int64 NextCmdBufferNumber = 0; + Atomics::AtomicInt64 NextCmdBufferNumber; RefCntAutoPtr<CommandQueueType> CmdQueue; ResourceReleaseQueue<DynamicStaleResourceWrapper> ReleaseQueue; }; |
