mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +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() )
|
if( !v->threadData.empty() )
|
||||||
{
|
{
|
||||||
ImGui::TextDisabled( "Threads:" );
|
if( v->threadData.size() == 1 )
|
||||||
ImGui::Indent();
|
|
||||||
for( auto& td : v->threadData )
|
|
||||||
{
|
{
|
||||||
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::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() )
|
if( !v->threadData.empty() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user