From 3d69c485bea4a3a913c2efd993516cee2654d17c Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Thu, 8 Feb 2024 09:46:17 -0800 Subject: [PATCH] fixing timestamp mapping range --- public/tracy/TracyMetal.hmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/tracy/TracyMetal.hmm b/public/tracy/TracyMetal.hmm index 9c89f841..c89c9225 100644 --- a/public/tracy/TracyMetal.hmm +++ b/public/tracy/TracyMetal.hmm @@ -213,7 +213,7 @@ public: TracyMetalPanic("Collect: too many pending timestamp queries.", return false;); } - NSRange range = NSMakeRange(begin, count); + NSRange range = NSMakeRange(RingIndex(begin), count); NSData* data = [m_counterSampleBuffer resolveCounterRange:range]; NSUInteger numResolvedTimestamps = data.length / sizeof(MTLCounterResultTimestamp); MTLCounterResultTimestamp* timestamps = (MTLCounterResultTimestamp *)(data.bytes);