summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineNextGenBase
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-08 03:53:26 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-08 03:53:26 +0000
commit20fbea68913e09adad6bb0a4357e995ceb782871 (patch)
tree5da2b6e8a452f5f37a519349fa51a3a5a922c818 /Graphics/GraphicsEngineNextGenBase
parentD3D11 backend: cosmetic code changes (diff)
downloadDiligentCore-20fbea68913e09adad6bb0a4357e995ceb782871.tar.gz
DiligentCore-20fbea68913e09adad6bb0a4357e995ceb782871.zip
More cosmetic code changes
Diffstat (limited to 'Graphics/GraphicsEngineNextGenBase')
-rw-r--r--Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h10
-rw-r--r--Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h6
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);
}