diff --git a/profiler/src/profiler/TracyView.hpp b/profiler/src/profiler/TracyView.hpp index b91571e3..29e685f5 100644 --- a/profiler/src/profiler/TracyView.hpp +++ b/profiler/src/profiler/TracyView.hpp @@ -293,7 +293,7 @@ private: void DrawSampleList( const TimelineContext& ctx, const std::vector& drawList, const Vector& vec, int offset, uint64_t tid ); void DrawZoneList( const TimelineContext& ctx, const std::vector& drawList, int offset, uint64_t tid, int maxDepth, double margin ); void DrawThreadCropper( const int depth, const uint64_t tid, const float xPos, const float yPos, const float ostep, const float cropperWidth, const bool hasCtxSwitches ); - void DrawContextSwitchList( const TimelineContext& ctx, const std::vector& drawList, const Vector& ctxSwitch, int offset, int endOffset, bool isFiber ); + void DrawContextSwitchList( const TimelineContext& ctx, const std::vector& drawList, const Vector& ctxSwitch, int offset, int endOffset, bool isFiber, uint64_t tid ); int DispatchGpuZoneLevel( const Vector>& 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 ); template 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 ); diff --git a/profiler/src/profiler/TracyView_ContextSwitch.cpp b/profiler/src/profiler/TracyView_ContextSwitch.cpp index c4e7ec59..9dcbbe92 100644 --- a/profiler/src/profiler/TracyView_ContextSwitch.cpp +++ b/profiler/src/profiler/TracyView_ContextSwitch.cpp @@ -166,7 +166,7 @@ const char* View::DecodeContextSwitchState( uint8_t state ) } } -void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector& drawList, const Vector& ctxSwitch, int offset, int endOffset, bool isFiber ) +void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector& drawList, const Vector& ctxSwitch, int offset, int endOffset, bool isFiber, uint64_t tid ) { constexpr float MinCtxSize = 4; @@ -293,7 +293,7 @@ void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector< { m_callstackView = { .id = waitStack, - .thread = m_worker.DecompressThread( ev.Thread() ), + .thread = tid, .wait = { .time = waitTime, .reason = waitReason, diff --git a/profiler/src/profiler/TracyView_ZoneTimeline.cpp b/profiler/src/profiler/TracyView_ZoneTimeline.cpp index 9ed11b71..5d3c8962 100644 --- a/profiler/src/profiler/TracyView_ZoneTimeline.cpp +++ b/profiler/src/profiler/TracyView_ZoneTimeline.cpp @@ -84,7 +84,7 @@ void View::DrawThread( const TimelineContext& ctx, const ThreadData& thread, con { auto ctxSwitch = m_worker.GetContextSwitchData( thread.id ); assert( ctxSwitch ); - DrawContextSwitchList( ctx, ctxDraw, ctxSwitch->v, ctxOffset, offset, thread.isFiber ); + DrawContextSwitchList( ctx, ctxDraw, ctxSwitch->v, ctxOffset, offset, thread.isFiber, thread.id ); } if( hasSamples && !samplesDraw.empty() ) {