From d5e085898261b39e5cdc86d3ab84e2127e2d065c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 19 Mar 2018 16:13:12 +0100 Subject: [PATCH] Display thread in GPU zone tooltip. --- server/TracyView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d4be34da..7038bdfc 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3461,6 +3461,7 @@ void View::ZoneTooltip( const ZoneEvent& ev ) void View::ZoneTooltip( const GpuEvent& ev ) { + const auto tid = GetZoneThread( ev ); const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc ); const auto name = m_worker.GetString( srcloc.name ); @@ -3475,6 +3476,9 @@ void View::ZoneTooltip( const GpuEvent& ev ) ImGui::Text( "%s", func ); ImGui::Separator(); ImGui::Text( "%s:%i", filename, line ); + ImGui::Text( "Thread: %s", m_worker.GetThreadString( tid ) ); + ImGui::SameLine(); + ImGui::TextDisabled( "(0x%" PRIX64 ")", tid ); ImGui::Text( "GPU execution time: %s", TimeToString( end - ev.gpuStart ) ); ImGui::Text( "CPU command setup time: %s", TimeToString( ev.cpuEnd - ev.cpuStart ) ); ImGui::Text( "Delay to execution: %s", TimeToString( ev.gpuStart - ev.cpuStart ) );