@@ -255,7 +255,7 @@ class View
255255 void DrawZoneList ( const TimelineContext& ctx, const std::vector<TimelineDraw>& drawList, int offset, uint64_t tid, int maxDepth, double margin );
256256 void DrawThreadCropper ( const int depth, const uint64_t tid, const float xPos, const float yPos, const float ostep, const float cropperWidth, const bool hasCtxSwitches );
257257 void DrawContextSwitchList ( const TimelineContext& ctx, const std::vector<ContextSwitchDraw>& drawList, const Vector<ContextSwitchData>& ctxSwitch, int offset, int endOffset, bool isFiber );
258- int DispatchGpuZoneLevel ( const Vector<short_ptr<GpuEvent >>& vec, bool hover, double pxns, int64_t nspx, const ImVec2& wpos, int offset, int depth, uint64_t thread, float yMin, float yMax, int64_t begin, int drift );
258+ int DispatchGpuZoneLevel ( const Vector<short_ptr<ZoneEvent >>& vec, bool hover, double pxns, int64_t nspx, const ImVec2& wpos, int offset, int depth, uint64_t thread, float yMin, float yMax, int64_t begin, int drift );
259259 template <typename Adapter, typename V>
260260 int DrawGpuZoneLevel ( const V& vec, bool hover, double pxns, int64_t nspx, const ImVec2& wpos, int offset, int depth, uint64_t thread, float yMin, float yMax, int64_t begin, int drift );
261261 template <typename Adapter, typename V>
@@ -333,21 +333,21 @@ class View
333333 uint32_t GetSrcLocColor ( const SourceLocation& srcloc, int depth );
334334 uint32_t GetRawSrcLocColor ( const SourceLocation& srcloc, int depth );
335335 uint32_t GetZoneColor ( const ZoneEvent& ev, uint64_t thread, int depth );
336- uint32_t GetZoneColor ( const GpuEvent & ev );
336+ uint32_t GetZoneColor ( const ZoneEvent & ev );
337337 ZoneColorData GetZoneColorData ( const ZoneEvent& ev, uint64_t thread, int depth, uint32_t inheritedColor );
338- ZoneColorData GetZoneColorData ( const GpuEvent & ev );
338+ ZoneColorData GetZoneColorData ( const ZoneEvent & ev );
339339
340340 void ZoomToZone ( const ZoneEvent& ev );
341- void ZoomToZone ( const GpuEvent & ev );
341+ void ZoomToZoneGPU ( const ZoneEvent & ev );
342342 void ZoomToPrevFrame ();
343343 void ZoomToNextFrame ();
344344 void CenterAtTime ( int64_t t );
345345
346346 void ShowZoneInfo ( const ZoneEvent& ev );
347- void ShowZoneInfo ( const GpuEvent & ev, uint64_t thread );
347+ void ShowZoneInfo ( const ZoneEvent & ev, uint64_t thread );
348348
349349 void ZoneTooltip ( const ZoneEvent& ev );
350- void ZoneTooltip ( const GpuEvent & ev );
350+ void ZoneTooltipGPU ( const ZoneEvent & ev );
351351 void CallstackTooltip ( uint32_t idx );
352352 void CallstackTooltipContents ( uint32_t idx );
353353 void CrashTooltip ();
@@ -357,11 +357,11 @@ class View
357357 const ZoneEvent* GetZoneChild ( const ZoneEvent& zone, int64_t time ) const ;
358358 bool IsZoneReentry ( const ZoneEvent& zone ) const ;
359359 bool IsZoneReentry ( const ZoneEvent& zone, uint64_t tid ) const ;
360- const GpuEvent* GetZoneParent ( const GpuEvent & zone ) const ;
360+ const ZoneEvent* GetZoneParentGPU ( const ZoneEvent & zone ) const ;
361361 const ThreadData* GetZoneThreadData ( const ZoneEvent& zone ) const ;
362362 uint64_t GetZoneThread ( const ZoneEvent& zone ) const ;
363- uint64_t GetZoneThread ( const GpuEvent & zone ) const ;
364- const GpuCtxData* GetZoneCtx ( const GpuEvent & zone ) const ;
363+ uint64_t GetZoneThreadGPU ( const EventAdapter< true > & zone ) const ;
364+ const GpuCtxData* GetZoneCtx ( const ZoneEvent & zone ) const ;
365365 bool FindMatchingZone ( int prev0, int prev1, int flags );
366366 const ZoneEvent* FindZoneAtTime ( uint64_t thread, int64_t time ) const ;
367367 uint64_t GetFrameNumber ( const FrameData& fd, int i ) const ;
@@ -379,12 +379,10 @@ class View
379379 void SmallCallstackButton ( const char * name, uint32_t callstack, int & idx, bool tooltip = true );
380380 void DrawCallstackCalls ( uint32_t callstack, uint16_t limit ) const ;
381381 void SetViewToLastFrames ();
382- int64_t GetZoneChildTime ( const ZoneEvent& zone );
383- int64_t GetZoneChildTime ( const GpuEvent& zone );
382+ int64_t GetZoneChildTime ( const ZoneEvent& zone, bool gpu );
384383 int64_t GetZoneChildTimeFast ( const ZoneEvent& zone );
385384 int64_t GetZoneChildTimeFastClamped ( const ZoneEvent& zone, int64_t t0, int64_t t1 );
386- int64_t GetZoneSelfTime ( const ZoneEvent& zone );
387- int64_t GetZoneSelfTime ( const GpuEvent& zone );
385+ int64_t GetZoneSelfTime ( const ZoneEvent& zone, bool gpu = false );
388386 bool GetZoneRunningTime ( const ContextSwitch* ctx, const ZoneEvent& ev, int64_t & time, uint64_t & cnt );
389387 bool GetZoneRunningTime ( const ContextSwitch* ctx, const ZoneEvent& ev, const RangeSlim& range, int64_t & time, uint64_t & cnt );
390388 const char * GetThreadContextData ( uint64_t thread, bool & local, bool & untracked, const char *& program );
@@ -479,8 +477,8 @@ class View
479477 DecayValue<const MessageData*> m_msgHighlight = nullptr ;
480478 DecayValue<uint32_t > m_lockHoverHighlight = InvalidId;
481479 DecayValue<const MessageData*> m_msgToFocus = nullptr ;
482- const GpuEvent * m_gpuInfoWindow = nullptr ;
483- const GpuEvent * m_gpuHighlight;
480+ const ZoneEvent * m_gpuInfoWindow = nullptr ;
481+ const ZoneEvent * m_gpuHighlight;
484482 uint64_t m_gpuInfoWindowThread;
485483 uint32_t m_callstackInfoWindow = 0 ;
486484 int64_t m_memoryAllocInfoWindow = -1 ;
@@ -575,7 +573,7 @@ class View
575573 BuzzAnim<uint32_t > m_statBuzzAnim;
576574
577575 Vector<const ZoneEvent*> m_zoneInfoStack;
578- Vector<const GpuEvent *> m_gpuInfoStack;
576+ Vector<const ZoneEvent *> m_gpuInfoStack;
579577
580578 SourceContents m_srcHintCache;
581579 std::unique_ptr<SourceView> m_sourceView;
@@ -877,8 +875,6 @@ class View
877875 struct {
878876 std::pair<const ZoneEvent*, int64_t > zoneSelfTime = { nullptr , 0 };
879877 std::pair<const ZoneEvent*, int64_t > zoneSelfTime2 = { nullptr , 0 };
880- std::pair<const GpuEvent*, int64_t > gpuSelfTime = { nullptr , 0 };
881- std::pair<const GpuEvent*, int64_t > gpuSelfTime2 = { nullptr , 0 };
882878 } m_cache;
883879
884880 struct {
0 commit comments