Skip to content

Commit

Permalink
Fixed issue with threading macros (#1335)
Browse files Browse the repository at this point in the history
Added a quick fix for threading affinity macro.
  • Loading branch information
SergioRZMasson authored Dec 18, 2023
1 parent c9e3cf8 commit 5d552ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Core/Graphics/Source/DeviceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -203,15 +203,15 @@ namespace Babylon::Graphics

void DeviceImpl::SetDiagnosticOutput(std::function<void(const char* output)> diagnosticOutput)
{
ASSERT_THREAD_AFFINITY(m_renderThreadAffinity.check());
ASSERT_THREAD_AFFINITY(m_renderThreadAffinity);
m_bgfxCallback.SetDiagnosticOutput(std::move(diagnosticOutput));
}

void DeviceImpl::StartRenderingCurrentFrame()
{
arcana::trace_region startRenderingRegion{"DeviceImpl::StartRenderingCurrentFrame"};

ASSERT_THREAD_AFFINITY(m_renderThreadAffinity.check());
ASSERT_THREAD_AFFINITY(m_renderThreadAffinity);

if (m_rendering)
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 5d552ff

Please sign in to comment.