mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Collection of GPU statistics.
This commit is contained in:
parent
f9279afaec
commit
28d029f820
@ -6095,6 +6095,24 @@ void Worker::ProcessGpuTime( const QueueGpuTime& ev )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
zone->SetGpuEnd( gpuTime );
|
zone->SetGpuEnd( gpuTime );
|
||||||
|
#ifndef TRACY_NO_STATISTICS
|
||||||
|
const auto gpuStart = zone->GpuStart();
|
||||||
|
const auto timeSpan = gpuTime - gpuStart;
|
||||||
|
if( timeSpan > 0 )
|
||||||
|
{
|
||||||
|
GpuZoneThreadData ztd;
|
||||||
|
ztd.SetZone( zone );
|
||||||
|
ztd.SetThread( zone->Thread() );
|
||||||
|
auto slz = GetGpuSourceLocationZones( zone->SrcLoc() );
|
||||||
|
slz->zones.push_back( ztd );
|
||||||
|
if( slz->min > timeSpan ) slz->min = timeSpan;
|
||||||
|
if( slz->max < timeSpan ) slz->max = timeSpan;
|
||||||
|
slz->total += timeSpan;
|
||||||
|
slz->sumSq += double( timeSpan ) * timeSpan;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
CountZoneStatistics( zone );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if( m_data.lastTime < gpuTime ) m_data.lastTime = gpuTime;
|
if( m_data.lastTime < gpuTime ) m_data.lastTime = gpuTime;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user