From 13440e98e8cd926620d9913aa72780ceaca4f668 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 30 Oct 2019 10:46:28 -0700 Subject: Some code refactoring --- .../include/DeviceContextNextGenBase.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'Graphics/GraphicsEngineNextGenBase') diff --git a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h index 3514513b..5a22e919 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h @@ -44,19 +44,17 @@ public: using ICommandQueueType = typename ImplementationTraits::ICommandQueueType; DeviceContextNextGenBase(IReferenceCounters* pRefCounters, - IRenderDevice* pRenderDevice, + DeviceImplType* pRenderDevice, Uint32 ContextId, Uint32 CommandQueueId, Uint32 NumCommandsToFlush, bool bIsDeferred) : - TBase(pRefCounters, - pRenderDevice, - bIsDeferred), - m_ContextId (ContextId), - m_CommandQueueId (CommandQueueId), - m_NumCommandsToFlush (NumCommandsToFlush), - m_ContextFrameNumber (0), - m_SubmittedBuffersCmdQueueMask(bIsDeferred ? 0 : Uint64{1} << Uint64{CommandQueueId}) + TBase{pRefCounters, pRenderDevice, bIsDeferred}, + m_ContextId {ContextId }, + m_CommandQueueId {CommandQueueId }, + m_NumCommandsToFlush {NumCommandsToFlush}, + m_ContextFrameNumber {0}, + m_SubmittedBuffersCmdQueueMask{bIsDeferred ? 0 : Uint64{1} << Uint64{CommandQueueId}} { } @@ -71,7 +69,7 @@ public: LOG_WARNING_MESSAGE("Deferred contexts have no associated command queues"); return nullptr; } - return this->m_pDevice.template RawPtr()->LockCommandQueue(m_CommandQueueId); + return this->m_pDevice->LockCommandQueue(m_CommandQueueId); } virtual void UnlockCommandQueue()override final @@ -81,7 +79,7 @@ public: LOG_WARNING_MESSAGE("Deferred contexts have no associated command queues"); return; } - this->m_pDevice.template RawPtr()->UnlockCommandQueue(m_CommandQueueId); + this->m_pDevice->UnlockCommandQueue(m_CommandQueueId); } protected: @@ -96,7 +94,7 @@ protected: } else { - this->m_pDevice.template RawPtr()->FlushStaleResources(m_CommandQueueId); + this->m_pDevice->FlushStaleResources(m_CommandQueueId); } Atomics::AtomicIncrement(m_ContextFrameNumber); } -- cgit v1.2.3