diff --git a/public/tracy/TracyMetal.hmm b/public/tracy/TracyMetal.hmm index b2956f28..bd0293a9 100644 --- a/public/tracy/TracyMetal.hmm +++ b/public/tracy/TracyMetal.hmm @@ -144,6 +144,12 @@ public: ~MetalCtx() { ZoneScopedNC("~TracyMetalCtx", tracy::Color::Red4); + ZoneValue(m_previousCheckpoint.load()); + ZoneValue(m_queryCounter.load()); + // collect the last remnants of Metal GPU activity... + // TODO: add a timeout to this loop? + while (m_previousCheckpoint.load() != m_queryCounter.load()) + Collect(); } static MetalCtx* Create(id device)