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).
This commit is contained in:
Bartosz Taudul 2021-10-11 00:29:24 +02:00
parent 733d267768
commit bcaac7b53f
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

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