diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 16cdc31d..9fc3dc94 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6037,92 +6037,96 @@ void View::DrawZoneInfoWindow() ImGui::Text( "State" ); ImGui::NextColumn(); ImGui::Separator(); - while( bit < eit ) + const auto wrsz = eit - bit; + ImGuiListClipper clipper( wrsz ); + while( clipper.Step() ) { - const auto cend = bit->End(); - const auto state = bit->State(); - const auto reason = bit->Reason(); - const auto cpu0 = bit->Cpu(); - ++bit; - const auto cstart = bit->Start(); - const auto cwakeup = bit->WakeupVal(); - const auto cpu1 = bit->Cpu(); + for( auto i=clipper.DisplayStart; i %i", cpu0, cpu1 ); + ImGui::Text( "%i -> %i", cpu0, cpu1 ); #endif - const auto tt0 = m_worker.GetThreadTopology( cpu0 ); - const auto tt1 = m_worker.GetThreadTopology( cpu1 ); - if( tt0 && tt1 ) - { - if( tt0->package != tt1->package ) + const auto tt0 = m_worker.GetThreadTopology( cpu0 ); + const auto tt1 = m_worker.GetThreadTopology( cpu1 ); + if( tt0 && tt1 ) { - ImGui::SameLine(); - TextDisabledUnformatted( "P" ); - } - else if( tt0->core != tt1->core ) - { - ImGui::SameLine(); - TextDisabledUnformatted( "C" ); + if( tt0->package != tt1->package ) + { + ImGui::SameLine(); + TextDisabledUnformatted( "P" ); + } + else if( tt0->core != tt1->core ) + { + ImGui::SameLine(); + TextDisabledUnformatted( "C" ); + } } } + ImGui::NextColumn(); + const char* desc; + if( reason == ContextSwitchData::NoState ) + { + ImGui::TextUnformatted( DecodeContextSwitchStateCode( state ) ); + desc = DecodeContextSwitchState( state ); + } + else + { + ImGui::TextUnformatted( DecodeContextSwitchReasonCode( reason ) ); + desc = DecodeContextSwitchReason( reason ); + } + if( *desc && ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::TextUnformatted( desc ); + ImGui::EndTooltip(); + } + ImGui::NextColumn(); } - ImGui::NextColumn(); - const char* desc; - if( reason == ContextSwitchData::NoState ) - { - ImGui::TextUnformatted( DecodeContextSwitchStateCode( state ) ); - desc = DecodeContextSwitchState( state ); - } - else - { - ImGui::TextUnformatted( DecodeContextSwitchReasonCode( reason ) ); - desc = DecodeContextSwitchReason( reason ); - } - if( *desc && ImGui::IsItemHovered() ) - { - ImGui::BeginTooltip(); - ImGui::TextUnformatted( desc ); - ImGui::EndTooltip(); - } - ImGui::NextColumn(); } ImGui::EndColumns();