mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Better Vulkan thread heuristics.
This commit is contained in:
parent
891e7711e9
commit
63184f8762
@ -2132,15 +2132,33 @@ void View::DrawZones()
|
||||
{
|
||||
if( !v->threadData.empty() )
|
||||
{
|
||||
ImGui::TextDisabled( "Threads:" );
|
||||
ImGui::Indent();
|
||||
for( auto& td : v->threadData )
|
||||
if( v->threadData.size() == 1 )
|
||||
{
|
||||
ImGui::TextUnformatted( m_worker.GetThreadName( td.first ) );
|
||||
auto it = v->threadData.begin();
|
||||
auto tid = it->first;
|
||||
if( tid == 0 )
|
||||
{
|
||||
if( !it->second.timeline.empty() )
|
||||
{
|
||||
tid = m_worker.DecompressThread( (*it->second.timeline.begin())->thread );
|
||||
}
|
||||
}
|
||||
TextFocused( "Thread:", m_worker.GetThreadName( tid ) );
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "(%s)", RealToString( td.first, true ) );
|
||||
ImGui::TextDisabled( "(%s)", RealToString( tid, true ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextDisabled( "Threads:" );
|
||||
ImGui::Indent();
|
||||
for( auto& td : v->threadData )
|
||||
{
|
||||
ImGui::TextUnformatted( m_worker.GetThreadName( td.first ) );
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "(%s)", RealToString( td.first, true ) );
|
||||
}
|
||||
ImGui::Unindent();
|
||||
}
|
||||
ImGui::Unindent();
|
||||
}
|
||||
}
|
||||
if( !v->threadData.empty() )
|
||||
|
Loading…
Reference in New Issue
Block a user