mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
GPU child zones time getter.
This commit is contained in:
parent
92c1420c30
commit
f06609eb61
@ -9064,6 +9064,20 @@ int64_t View::GetZoneChildTime( const ZoneEvent& zone )
|
||||
return time;
|
||||
}
|
||||
|
||||
int64_t View::GetZoneChildTime( const GpuEvent& zone )
|
||||
{
|
||||
int64_t time = 0;
|
||||
if( zone.child >= 0 )
|
||||
{
|
||||
for( auto& v : m_worker.GetGpuChildren( zone.child ) )
|
||||
{
|
||||
const auto childSpan = std::max( int64_t( 0 ), v->gpuEnd - v->gpuStart );
|
||||
time += childSpan;
|
||||
}
|
||||
}
|
||||
return time;
|
||||
}
|
||||
|
||||
int64_t View::GetZoneChildTimeFast( const ZoneEvent& zone )
|
||||
{
|
||||
int64_t time = 0;
|
||||
|
@ -170,6 +170,7 @@ private:
|
||||
void SmallCallstackButton( const char* name, uint32_t callstack, int& idx );
|
||||
void SetViewToLastFrames();
|
||||
int64_t GetZoneChildTime( const ZoneEvent& zone );
|
||||
int64_t GetZoneChildTime( const GpuEvent& zone );
|
||||
int64_t GetZoneChildTimeFast( const ZoneEvent& zone );
|
||||
|
||||
flat_hash_map<const void*, bool, nohash<const void*>> m_visible;
|
||||
|
Loading…
Reference in New Issue
Block a user