From 57d21b1b34187df0ff1a3d31b85285fa2e21c9e5 Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 2 Dec 2020 20:08:06 -0800 Subject: Added IDeviceContext::GetFrameNumber() method (API ) --- .../include/DeviceContextNextGenBase.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Graphics/GraphicsEngineNextGenBase') diff --git a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp index 84ad7a91..66751ac2 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp +++ b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp @@ -27,7 +27,6 @@ #pragma once -#include "Atomics.hpp" #include "BasicTypes.h" #include "ReferenceCounters.h" #include "RefCntAutoPtr.hpp" @@ -58,7 +57,6 @@ public: m_ContextId {ContextId }, m_CommandQueueId {CommandQueueId }, m_NumCommandsToFlush {NumCommandsToFlush}, - m_ContextFrameNumber {0}, m_SubmittedBuffersCmdQueueMask{bIsDeferred ? 0 : Uint64{1} << Uint64{CommandQueueId}} // clang-format on { @@ -106,13 +104,12 @@ protected: { this->m_pDevice->FlushStaleResources(m_CommandQueueId); } - Atomics::AtomicIncrement(m_ContextFrameNumber); + TBase::EndFrame(); } - const Uint32 m_ContextId; - const Uint32 m_CommandQueueId; - const Uint32 m_NumCommandsToFlush; - Atomics::AtomicInt64 m_ContextFrameNumber; + const Uint32 m_ContextId; + const Uint32 m_CommandQueueId; + const Uint32 m_NumCommandsToFlush; // This mask indicates which command queues command buffers from this context were submitted to. // For immediate context, this will always be 1 << m_CommandQueueId. -- cgit v1.2.3