From fd1e60e2fd383faf20de98e388c2cb6507d848e1 Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Wed, 7 Feb 2024 14:19:59 -0800 Subject: [PATCH] fixing cpu timestamp baseline --- public/tracy/TracyMetal.hmm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/tracy/TracyMetal.hmm b/public/tracy/TracyMetal.hmm index 3bf129f2..871dce18 100644 --- a/public/tracy/TracyMetal.hmm +++ b/public/tracy/TracyMetal.hmm @@ -115,10 +115,12 @@ public: MTLTimestamp cpuTimestamp = 0; MTLTimestamp gpuTimestamp = 0; - float period = 1.0f; [m_device sampleTimestamps:&cpuTimestamp gpuTimestamp:&gpuTimestamp]; fprintf(stdout, "TracyMetal: Calibration: CPU timestamp: %llu\n", cpuTimestamp); fprintf(stdout, "TracyMetal: Calibration: GPU timestamp: %llu\n", gpuTimestamp); + cpuTimestamp = Profiler::GetTime(); + fprintf(stdout, "TracyMetal: Calibration: CPU timestamp (profiler): %llu\n", cpuTimestamp); + float period = 1.08f; m_contextId = GetGpuCtxCounter().fetch_add(1);