diff options
Diffstat (limited to 'Graphics/GraphicsEngineNextGenBase')
| -rw-r--r-- | Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h | 10 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h b/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h index 3790c53c..7e8c8849 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h +++ b/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h @@ -63,13 +63,13 @@ public: void DiscardMasterBlocks(std::vector<MasterBlock>& /*Blocks*/, Uint64 FenceValue) { - std::lock_guard<std::mutex> Lock(m_RingBufferMtx); + std::lock_guard<std::mutex> Lock{m_RingBufferMtx}; m_RingBuffer.FinishCurrentFrame(FenceValue); } void ReleaseStaleBlocks(Uint64 LastCompletedFenceValue) { - std::lock_guard<std::mutex> Lock(m_RingBufferMtx); + std::lock_guard<std::mutex> Lock{m_RingBufferMtx}; m_RingBuffer.ReleaseCompletedFrames(LastCompletedFenceValue); } @@ -79,7 +79,7 @@ public: protected: MasterBlock AllocateMasterBlock(OffsetType SizeInBytes, OffsetType Alignment) { - std::lock_guard<std::mutex> Lock(m_RingBufferMtx); + std::lock_guard<std::mutex> Lock{m_RingBufferMtx}; return m_RingBuffer.Allocate(SizeInBytes, Alignment); } @@ -144,7 +144,7 @@ public: { if (Mgr != nullptr) { - std::lock_guard<std::mutex> Lock(Mgr->m_AllocationsMgrMtx); + std::lock_guard<std::mutex> Lock{Mgr->m_AllocationsMgrMtx}; #ifdef DEVELOPMENT --Mgr->m_MasterBlockCounter; #endif @@ -169,7 +169,7 @@ public: protected: MasterBlock AllocateMasterBlock(OffsetType SizeInBytes, OffsetType Alignment) { - std::lock_guard<std::mutex> Lock(m_AllocationsMgrMtx); + std::lock_guard<std::mutex> Lock{m_AllocationsMgrMtx}; auto NewBlock = m_AllocationsMgr.Allocate(SizeInBytes, Alignment); #ifdef DEVELOPMENT if (NewBlock.IsValid()) diff --git a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h index bac01188..135dd941 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h @@ -153,7 +153,7 @@ public: Uint64 CmdBufferNumber = 0; Uint64 FenceValue = 0; { - std::lock_guard<std::mutex> Lock(Queue.Mtx); + std::lock_guard<std::mutex> Lock{Queue.Mtx}; if (ReleaseResources) { @@ -193,7 +193,7 @@ public: auto& Queue = m_CommandQueues[QueueIndex]; { - std::lock_guard<std::mutex> Lock(Queue.Mtx); + std::lock_guard<std::mutex> Lock{Queue.Mtx}; // Increment command buffer number before submitting the cmd buffer. // This will make sure that any resource released while this function @@ -256,7 +256,7 @@ public: { VERIFY_EXPR(QueueIndex < m_CmdQueueCount); auto& Queue = m_CommandQueues[QueueIndex]; - std::lock_guard<std::mutex> Lock(Queue.Mtx); + std::lock_guard<std::mutex> Lock{Queue.Mtx}; Action(Queue.CmdQueue); } |
