Process zone validation messages.

This commit is contained in:
Bartosz Taudul 2019-01-14 22:56:10 +01:00
parent 8e52ab318b
commit dcc6bee607
3 changed files with 13 additions and 0 deletions

View File

@ -210,6 +210,8 @@ struct ThreadData
Vector<ZoneEvent*> timeline; Vector<ZoneEvent*> timeline;
Vector<ZoneEvent*> stack; Vector<ZoneEvent*> stack;
Vector<MessageData*> messages; Vector<MessageData*> messages;
uint32_t nextZoneId;
Vector<uint32_t> zoneIdStack;
}; };
struct GpuCtxData struct GpuCtxData

View File

@ -1758,6 +1758,7 @@ ThreadData* Worker::NewThread( uint64_t thread )
auto td = m_slab.AllocInit<ThreadData>(); auto td = m_slab.AllocInit<ThreadData>();
td->id = thread; td->id = thread;
td->count = 0; td->count = 0;
td->nextZoneId = 0;
m_data.threads.push_back( td ); m_data.threads.push_back( td );
m_threadMap.emplace( thread, td ); m_threadMap.emplace( thread, td );
return td; return td;
@ -2102,6 +2103,9 @@ void Worker::Process( const QueueItem& ev )
case QueueType::ZoneEnd: case QueueType::ZoneEnd:
ProcessZoneEnd( ev.zoneEnd ); ProcessZoneEnd( ev.zoneEnd );
break; break;
case QueueType::ZoneValidation:
ProcessZoneValidation( ev.zoneValidation );
break;
case QueueType::FrameMarkMsg: case QueueType::FrameMarkMsg:
ProcessFrameMark( ev.frameMark ); ProcessFrameMark( ev.frameMark );
break; break;
@ -2303,6 +2307,12 @@ void Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
#endif #endif
} }
void Worker::ProcessZoneValidation( const QueueZoneValidation& ev )
{
auto td = NoticeThread( ev.thread );
td->nextZoneId = ev.id;
}
void Worker::ProcessFrameMark( const QueueFrameMark& ev ) void Worker::ProcessFrameMark( const QueueFrameMark& ev )
{ {
auto fd = m_data.frames.Retrieve( ev.name, [this] ( uint64_t name ) { auto fd = m_data.frames.Retrieve( ev.name, [this] ( uint64_t name ) {

View File

@ -279,6 +279,7 @@ private:
tracy_force_inline void ProcessZoneBeginCallstack( const QueueZoneBegin& ev ); tracy_force_inline void ProcessZoneBeginCallstack( const QueueZoneBegin& ev );
tracy_force_inline void ProcessZoneBeginAllocSrcLoc( const QueueZoneBegin& ev ); tracy_force_inline void ProcessZoneBeginAllocSrcLoc( const QueueZoneBegin& ev );
tracy_force_inline void ProcessZoneEnd( const QueueZoneEnd& ev ); tracy_force_inline void ProcessZoneEnd( const QueueZoneEnd& ev );
tracy_force_inline void ProcessZoneValidation( const QueueZoneValidation& ev );
tracy_force_inline void ProcessFrameMark( const QueueFrameMark& ev ); tracy_force_inline void ProcessFrameMark( const QueueFrameMark& ev );
tracy_force_inline void ProcessFrameMarkStart( const QueueFrameMark& ev ); tracy_force_inline void ProcessFrameMarkStart( const QueueFrameMark& ev );
tracy_force_inline void ProcessFrameMarkEnd( const QueueFrameMark& ev ); tracy_force_inline void ProcessFrameMarkEnd( const QueueFrameMark& ev );