From 323c37bd339acd0fa1f5efd685a85da1cc56424a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 4 Aug 2019 00:30:09 +0200 Subject: [PATCH] Fix GPU zone search. --- server/TracyView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 2a899b8e..cad624a7 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2520,7 +2520,7 @@ int View::DrawGpuZoneLevel( const Vector& vec, bool hover, double pxn for(;;) { const auto prevIt = it; - it = std::lower_bound( it, zitend, nextTime, [] ( const auto& l, const auto& r ) { return (uint64_t)l->gpuEnd < (uint64_t)r; } ); + it = std::lower_bound( it, zitend, nextTime, [begin, drift] ( const auto& l, const auto& r ) { return (uint64_t)AdjustGpuTime( l->gpuEnd, begin, drift ) < (uint64_t)r; } ); if( it == prevIt ) ++it; num += std::distance( prevIt, it ); if( it == zitend ) break; @@ -2670,7 +2670,7 @@ int View::SkipGpuZoneLevel( const Vector& vec, bool hover, double pxn for(;;) { const auto prevIt = it; - it = std::lower_bound( it, zitend, nextTime, [] ( const auto& l, const auto& r ) { return (uint64_t)l->gpuEnd < (uint64_t)r; } ); + it = std::lower_bound( it, zitend, nextTime, [begin, drift] ( const auto& l, const auto& r ) { return (uint64_t)AdjustGpuTime( l->gpuEnd, begin, drift ) < (uint64_t)r; } ); if( it == prevIt ) ++it; if( it == zitend ) break; const auto nend = AdjustGpuTime( m_worker.GetZoneEnd( **it ), begin, drift );