From 5d552ff59820aee84841c1d6e23f1695df42d82b Mon Sep 17 00:00:00 2001 From: "Sergio R. Z. Masson" <97050577+SergioRZMasson@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:26:36 -0300 Subject: [PATCH] Fixed issue with threading macros (#1335) Added a quick fix for threading affinity macro. --- Core/Graphics/Source/DeviceImpl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/Graphics/Source/DeviceImpl.cpp b/Core/Graphics/Source/DeviceImpl.cpp index 767944e90..2a2872587 100644 --- a/Core/Graphics/Source/DeviceImpl.cpp +++ b/Core/Graphics/Source/DeviceImpl.cpp @@ -161,7 +161,7 @@ namespace Babylon::Graphics void DeviceImpl::DisableRendering() { - ASSERT_THREAD_AFFINITY(m_renderThreadAffinity.check()); + ASSERT_THREAD_AFFINITY(m_renderThreadAffinity); std::scoped_lock lock{m_state.Mutex}; @@ -203,7 +203,7 @@ namespace Babylon::Graphics void DeviceImpl::SetDiagnosticOutput(std::function diagnosticOutput) { - ASSERT_THREAD_AFFINITY(m_renderThreadAffinity.check()); + ASSERT_THREAD_AFFINITY(m_renderThreadAffinity); m_bgfxCallback.SetDiagnosticOutput(std::move(diagnosticOutput)); } @@ -211,7 +211,7 @@ namespace Babylon::Graphics { arcana::trace_region startRenderingRegion{"DeviceImpl::StartRenderingCurrentFrame"}; - ASSERT_THREAD_AFFINITY(m_renderThreadAffinity.check()); + ASSERT_THREAD_AFFINITY(m_renderThreadAffinity); if (m_rendering) { @@ -249,7 +249,7 @@ namespace Babylon::Graphics arcana::trace_region finishRenderingRegion{"DeviceImpl::FinishRenderingCurrentFrame"}; - ASSERT_THREAD_AFFINITY(m_renderThreadAffinity.check()); + ASSERT_THREAD_AFFINITY(m_renderThreadAffinity); if (!m_rendering) {