From bcaac7b53fe0b396074a544ea1e385b46b45db81 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 11 Oct 2021 00:29:24 +0200 Subject: [PATCH] Add ~2 second overflow grace period. This fixes issues when the GPU is actually permitted to report out-of-order timestamps (e.g. when tasks are scheduled by the GPU, instead of being forced to execute in submission order). --- server/TracyWorker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 942ee251..0d651656 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -5693,7 +5693,7 @@ void Worker::ProcessGpuTime( const QueueGpuTime& ev ) int64_t tgpu = m_refTimeGpu + ev.gpuTime; m_refTimeGpu = tgpu; - if( tgpu < ctx->lastGpuTime ) + if( tgpu < ctx->lastGpuTime - ( 1u << 31 ) ) { if( ctx->overflow == 0 ) {