diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-10-30 17:46:28 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-10-30 17:46:28 +0000 |
| commit | 13440e98e8cd926620d9913aa72780ceaca4f668 (patch) | |
| tree | 1d40d82d0f450a2b2678642d6db9eff055dbee94 /Graphics/GraphicsEngineNextGenBase | |
| parent | Fixed few more gcc/clang compile issue (diff) | |
| download | DiligentCore-13440e98e8cd926620d9913aa72780ceaca4f668.tar.gz DiligentCore-13440e98e8cd926620d9913aa72780ceaca4f668.zip | |
Some code refactoring
Diffstat (limited to 'Graphics/GraphicsEngineNextGenBase')
| -rw-r--r-- | Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h | 22 |
1 files changed, 10 insertions, 12 deletions
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<DeviceImplType>()->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<DeviceImplType>()->UnlockCommandQueue(m_CommandQueueId); + this->m_pDevice->UnlockCommandQueue(m_CommandQueueId); } protected: @@ -96,7 +94,7 @@ protected: } else { - this->m_pDevice.template RawPtr<DeviceImplType>()->FlushStaleResources(m_CommandQueueId); + this->m_pDevice->FlushStaleResources(m_CommandQueueId); } Atomics::AtomicIncrement(m_ContextFrameNumber); } |
