mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Disallow negative GPU times.
Shouldn't happen, but GPU timestamps are a shitshow, so better be safe than sorry.
This commit is contained in:
parent
0ac432dd25
commit
7ce8c772ad
@ -4297,8 +4297,9 @@ void Worker::ProcessGpuTime( const QueueGpuTime& ev )
|
||||
auto ctx = m_gpuCtxMap[ev.context];
|
||||
assert( ctx );
|
||||
|
||||
const int64_t t = m_refTimeGpu + ev.gpuTime;
|
||||
m_refTimeGpu = t;
|
||||
const int64_t tref = m_refTimeGpu + ev.gpuTime;
|
||||
m_refTimeGpu = tref;
|
||||
const int64_t t = std::max<int64_t>( 0, tref );
|
||||
|
||||
int64_t gpuTime;
|
||||
if( ctx->period == 1.f )
|
||||
|
Loading…
Reference in New Issue
Block a user