From 95c92591932fcba97e37aed168b327f425f355ce Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 2 May 2020 00:05:58 +0200 Subject: [PATCH] Draw register dependency decorations on scroll bar. --- server/TracySourceView.cpp | 35 +++++++++++++++++++++++++++++++++++ server/TracySourceView.hpp | 1 + 2 files changed, 36 insertions(+) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 9656085b..64313757 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -1693,6 +1693,41 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_mapAddLine( ImVec2( x50, yStart ), ImVec2( x50, yEnd ), 0xFF00FF00 ); draw->AddLine( ImVec2( x25, yTarget ), ImVec2( x75, yTarget ), 0xFF00FF00 ); } + + if( m_asmSelected >= 0 ) + { + const auto x0 = rect.Min.x; + const auto x1 = rect.Min.x + rect.GetWidth() * 0.2f; + float sy; + for( size_t i=0; iAddLine( ImVec2( x0, ly ), ImVec2( x1, ly ), col, 3 ); + } + } + } + draw->AddLine( ImVec2( x0, sy ), ImVec2( x1, sy ), 0xFFFF9900, 3 ); + } } if( m_font ) ImGui::PopFont(); diff --git a/server/TracySourceView.hpp b/server/TracySourceView.hpp index 733dd956..44cf931a 100644 --- a/server/TracySourceView.hpp +++ b/server/TracySourceView.hpp @@ -85,6 +85,7 @@ private: enum { WriteBit = 0x200 }; enum { ReuseBit = 0x400 }; enum { RegMask = 0x0FF }; + enum { FlagMask = 0xF00 }; struct AsmLine {