mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Create GPU source location zones stats entry, if not present.
In case of CPU statistics data, this entry is created during creation of a source location. This won't be done for GPU zones, as it would needlessly expand the number of held entries. This is assuming the number of GPU zones is significantly less than the number of CPU zones.
This commit is contained in:
parent
32173dca29
commit
df96293477
@ -3786,7 +3786,10 @@ Worker::SourceLocationZones* Worker::GetSourceLocationZonesReal( uint16_t srcloc
|
||||
Worker::GpuSourceLocationZones* Worker::GetGpuSourceLocationZonesReal( uint16_t srcloc )
|
||||
{
|
||||
auto it = m_data.gpuSourceLocationZones.find( srcloc );
|
||||
assert( it != m_data.gpuSourceLocationZones.end() );
|
||||
if( it == m_data.gpuSourceLocationZones.end() )
|
||||
{
|
||||
it = m_data.gpuSourceLocationZones.emplace( srcloc, GpuSourceLocationZones() ).first;
|
||||
}
|
||||
m_data.gpuZonesLast.first = srcloc;
|
||||
m_data.gpuZonesLast.second = &it->second;
|
||||
return &it->second;
|
||||
|
Loading…
Reference in New Issue
Block a user