From 588ecd05de0bd124d5210018c06be26838d689cf Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 3 Oct 2018 07:52:06 -0700 Subject: Reworked D3D12 descriptor heaps to rely on device release queues --- .../GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineNextGenBase') diff --git a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h index f492e527..aaf1a615 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.h @@ -61,13 +61,18 @@ public: protected: // Should be called at the end of FinishFrame() - void EndFrame() + template + void EndFrame(RenderDeviceImplType& RenderDeviceImpl) { if (m_bIsDeferred) { // For deferred context, reset submitted cmd queue mask m_SubmittedBuffersCmdQueueMask = 0; } + else + { + RenderDeviceImpl.FlushStaleResources(m_CommandQueueId); + } Atomics::AtomicIncrement(m_ContextFrameNumber); } -- cgit v1.2.3