mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Support serial callstacks when processing GPU zones.
This commit is contained in:
parent
90de2d2f73
commit
a4764141c6
@ -5276,10 +5276,19 @@ void Worker::ProcessGpuZoneBeginCallstack( const QueueGpuZoneBegin& ev, bool ser
|
|||||||
{
|
{
|
||||||
auto zone = m_slab.Alloc<GpuEvent>();
|
auto zone = m_slab.Alloc<GpuEvent>();
|
||||||
ProcessGpuZoneBeginImpl( zone, ev, serial );
|
ProcessGpuZoneBeginImpl( zone, ev, serial );
|
||||||
|
if( serial )
|
||||||
|
{
|
||||||
|
assert( m_serialNextCallstack != 0 );
|
||||||
|
zone->callstack.SetVal( m_serialNextCallstack );
|
||||||
|
m_serialNextCallstack = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
auto it = m_nextCallstack.find( m_threadCtx );
|
auto it = m_nextCallstack.find( m_threadCtx );
|
||||||
assert( it != m_nextCallstack.end() );
|
assert( it != m_nextCallstack.end() );
|
||||||
zone->callstack.SetVal( it->second );
|
zone->callstack.SetVal( it->second );
|
||||||
it->second = 0;
|
it->second = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ProcessGpuZoneBeginAllocSrcLoc( const QueueGpuZoneBeginLean& ev, bool serial )
|
void Worker::ProcessGpuZoneBeginAllocSrcLoc( const QueueGpuZoneBeginLean& ev, bool serial )
|
||||||
@ -5292,10 +5301,19 @@ void Worker::ProcessGpuZoneBeginAllocSrcLocCallstack( const QueueGpuZoneBeginLea
|
|||||||
{
|
{
|
||||||
auto zone = m_slab.Alloc<GpuEvent>();
|
auto zone = m_slab.Alloc<GpuEvent>();
|
||||||
ProcessGpuZoneBeginAllocSrcLocImpl( zone, ev, serial );
|
ProcessGpuZoneBeginAllocSrcLocImpl( zone, ev, serial );
|
||||||
|
if( serial )
|
||||||
|
{
|
||||||
|
assert( m_serialNextCallstack != 0 );
|
||||||
|
zone->callstack.SetVal( m_serialNextCallstack );
|
||||||
|
m_serialNextCallstack = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
auto it = m_nextCallstack.find( m_threadCtx );
|
auto it = m_nextCallstack.find( m_threadCtx );
|
||||||
assert( it != m_nextCallstack.end() );
|
assert( it != m_nextCallstack.end() );
|
||||||
zone->callstack.SetVal( it->second );
|
zone->callstack.SetVal( it->second );
|
||||||
it->second = 0;
|
it->second = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev, bool serial )
|
void Worker::ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev, bool serial )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user