Hi Tracy team,
I modified Tracy’s Metal integration (TracyMetal.hmm) and now GPU zone timestamps are badly misaligned with CPU zones.
I changed the Collect() logic in TracyMetal.hmm to use MTLCommandBuffer::addCompletedHandler to measure the GPU execution duration of a frame. The completion handler provides timing in CFTimeInterval
Because of that change, I replaced the original gputime timestamp source with Profiler::GetTime() (so both CPU zones and the GPU context would use the same clock). which is MemWrite(&item->gpuNewContext.gpuTime, Profiler::GetTime())
After replacing gputime with Profiler::GetTime(), GPU zones appear far earlier (many seconds, ~20s+) than they should, and they no longer line up with CPU zones, even though both are now using Profiler::GetTime()
Are there recommended debugging/visualization techniques inside Tracy to diagnose CPU/GPU misalignment,I ’ve already tried many different alignment/conversion changes, but none of them had any effect
Any help or guidance would be greatly appreciated—thank you for your time