From cfc713b96b3aef8726ffe1f0d0af0e572d5ce84b Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 7 Feb 2021 13:59:11 -0800 Subject: DeviceContextD3D12Impl: reworked flush to also execute deferred command lists to avoid redundant submit --- .../GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineNextGenBase') diff --git a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp index 9e928feb..cb059bca 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp +++ b/Graphics/GraphicsEngineNextGenBase/include/DeviceContextNextGenBase.hpp @@ -98,7 +98,7 @@ protected: if (this->m_bIsDeferred) { // For deferred context, reset submitted cmd queue mask - m_SubmittedBuffersCmdQueueMask = 0; + m_SubmittedBuffersCmdQueueMask.store(0); } else { @@ -116,7 +116,7 @@ protected: // For deferred contexts, this will accumulate bits of the queues to which command buffers // were submitted to before FinishFrame() was called. This mask is used to release resources // allocated by the context during the frame when FinishFrame() is called. - Uint64 m_SubmittedBuffersCmdQueueMask = 0; + std::atomic_uint64_t m_SubmittedBuffersCmdQueueMask{0}; }; } // namespace Diligent -- cgit v1.2.3