1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Collect pending timestamps during shutdown

This commit is contained in:
Marcos Slomp 2024-05-16 22:24:35 -07:00
parent ea65b145c6
commit 799360dfb8

View File

@ -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<MTLDevice> device)