mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Fix CPU thread highlight for Vulkan zones.
This commit is contained in:
parent
2379d422cf
commit
07e69a88c2
@ -3482,6 +3482,7 @@ int View::DrawGpuZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx,
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto zoneThread = thread != 0 ? thread : m_worker.DecompressThread( ev.Thread() );
|
||||
ZoneTooltip( ev );
|
||||
|
||||
if( ImGui::IsMouseClicked( 2 ) && rend - start > 0 )
|
||||
@ -3490,10 +3491,10 @@ int View::DrawGpuZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx,
|
||||
}
|
||||
if( ImGui::IsMouseClicked( 0 ) )
|
||||
{
|
||||
ShowZoneInfo( ev, thread );
|
||||
ShowZoneInfo( ev, zoneThread );
|
||||
}
|
||||
|
||||
m_gpuThread = thread;
|
||||
m_gpuThread = zoneThread;
|
||||
m_gpuStart = ev.CpuStart();
|
||||
m_gpuEnd = ev.CpuEnd();
|
||||
}
|
||||
@ -3551,6 +3552,7 @@ int View::DrawGpuZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx,
|
||||
|
||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ) ) )
|
||||
{
|
||||
const auto zoneThread = thread != 0 ? thread : m_worker.DecompressThread( ev.Thread() );
|
||||
ZoneTooltip( ev );
|
||||
|
||||
if( !m_zoomAnim.active && ImGui::IsMouseClicked( 2 ) )
|
||||
@ -3559,10 +3561,10 @@ int View::DrawGpuZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx,
|
||||
}
|
||||
if( ImGui::IsMouseClicked( 0 ) )
|
||||
{
|
||||
ShowZoneInfo( ev, thread );
|
||||
ShowZoneInfo( ev, zoneThread );
|
||||
}
|
||||
|
||||
m_gpuThread = thread;
|
||||
m_gpuThread = zoneThread;
|
||||
m_gpuStart = ev.CpuStart();
|
||||
m_gpuEnd = ev.CpuEnd();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user