fixing timestamp mapping range

This commit is contained in:
Marcos Slomp 2024-02-08 09:46:17 -08:00
parent 94407dbd1f
commit 3d69c485be

View File

@ -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);