From feab5f9bf9a51ebe5aeeb28126299b4c782fe1b9 Mon Sep 17 00:00:00 2001 From: Beq Date: Wed, 3 Nov 2021 19:34:34 +0000 Subject: [PATCH] rename llfloaterperformance.cpp as it will not appear in current form Adds the various controls and other supporting settings. --- indra/newview/CMakeLists.txt | 6 +- indra/newview/app_settings/settings.xml | 36 +- ...rformance.cpp => fsfloaterperformance.cpp} | 486 +++++++++++++----- ...erperformance.h => fsfloaterperformance.h} | 5 + indra/newview/llfloaterpreference.cpp | 26 +- indra/newview/llfloaterpreference.h | 4 +- indra/newview/llviewercontrol.cpp | 45 +- .../default/xui/en/floater_performance.xml | 194 ++++--- .../menu_perf_avatar_rendering_settings.xml | 40 ++ .../xui/en/panel_performance_complexity.xml | 104 ++-- .../default/xui/en/panel_performance_huds.xml | 2 +- .../xui/en/panel_performance_nearby.xml | 51 +- .../xui/en/panel_performance_preferences.xml | 11 - 13 files changed, 700 insertions(+), 310 deletions(-) rename indra/newview/{llfloaterperformance.cpp => fsfloaterperformance.cpp} (56%) rename indra/newview/{llfloaterperformance.h => fsfloaterperformance.h} (93%) create mode 100644 indra/newview/skins/default/xui/en/menu_perf_avatar_rendering_settings.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0bcdd48710..87b2a38b01 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -397,7 +397,8 @@ set(viewer_SOURCE_FILES llfloaterpathfindinglinksets.cpp llfloaterpathfindingobjects.cpp llfloaterpay.cpp - llfloaterperformance.cpp + # llfloaterperformance.cpp replaced with fs version due to large changes and likelihood that LL version will not release. + fsfloaterperformance.cpp llfloaterperms.cpp llfloaterpostprocess.cpp llfloaterpreference.cpp @@ -1178,7 +1179,8 @@ set(viewer_HEADER_FILES llfloaterpathfindinglinksets.h llfloaterpathfindingobjects.h llfloaterpay.h - llfloaterperformance.h + # llfloaterperformance.h replaced with fs version due to large changes and likelihood that LL version will not release. + fsfloaterperformance.h llfloaterperms.h llfloaterpostprocess.h llfloaterpreference.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 87ad1598c3..d9330f424c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8171,7 +8171,7 @@ Comment Duration in seconds of the login SRV request timeout Persist - 0 + 1 Type F32 Value @@ -25717,12 +25717,23 @@ Change of this parameter will affect the layout of buttons in notification toast Comment Allow the viewer to adjust your settings to achieve target FPS Persist - 1 + 0 Type Boolean Value 0 + FSPerfFloaterSmoothingPeriods + + Comment + Number of periods to smooth the stats over + Persist + 1 + Type + U32 + Value + 50 + FSAutoUnmuteSounds Comment @@ -25756,10 +25767,10 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 - RenderAvatarUseART + FSPerfStatsCaptureEnabled Comment - Use Avatar Render Time (ART) instead of complexity (ARC) (true) + Enable/disable render time data to support autotune. Persist 1 Type @@ -25767,16 +25778,27 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 - RenderAvatarMaxART + FSRenderAvatarMaxART Comment Render Time Limit in microseconds (0.0 = no limit) Persist 1 Type - F32 + U32 Value - 0.0 + 50 + + FSTuningFPSStrategy + + Comment + Stategy to use when tuning FPS. 0=Tune avatar rendering only, 1=Tune both avatar and global scene settings. + Persist + 1 + Type + U32 + Value + 0 diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/fsfloaterperformance.cpp similarity index 56% rename from indra/newview/llfloaterperformance.cpp rename to indra/newview/fsfloaterperformance.cpp index 4ab2d562b8..f21d9dfad1 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/fsfloaterperformance.cpp @@ -35,12 +35,17 @@ #include "llfeaturemanager.h" #include "llfloaterpreference.h" // LLAvatarComplexityControls #include "llfloaterreg.h" +#include "llmoveview.h" // for LLPanelStandStopFlying #include "llnamelistctrl.h" #include "llradiogroup.h" +#include "llselectmgr.h" #include "llsliderctrl.h" #include "lltextbox.h" +#include "llcombobox.h" #include "lltrans.h" #include "llviewerobjectlist.h" +#include "llviewerjoystick.h" +#include "llviewermediafocus.h" #include "llvoavatar.h" #include "llvoavatarself.h" #include "pipeline.h" @@ -70,7 +75,8 @@ protected: LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; registrar.add("Settings.SetRendering", boost::bind(&LLFloaterPerformance::onCustomAction, mFloaterPerformance, _2, mUUIDs.front())); enable_registrar.add("Settings.IsSelected", boost::bind(&LLFloaterPerformance::isActionChecked, mFloaterPerformance, _2, mUUIDs.front())); - LLContextMenu* menu = createFromFile("menu_avatar_rendering_settings.xml"); + registrar.add("Avatar.Extended", boost::bind(&LLFloaterPerformance::onExtendedAction, mFloaterPerformance, _2, mUUIDs.front())); + LLContextMenu* menu = createFromFile("menu_perf_avatar_rendering_settings.xml"); return menu; } @@ -78,6 +84,8 @@ protected: LLFloaterPerformance* mFloaterPerformance; }; + + LLFloaterPerformance::LLFloaterPerformance(const LLSD& key) : LLFloater(key), mUpdateTimer(new LLTimer()), @@ -100,16 +108,26 @@ BOOL LLFloaterPerformance::postBuild() mComplexityPanel = getChild("panel_performance_complexity"); mSettingsPanel = getChild("panel_performance_preferences"); mHUDsPanel = getChild("panel_performance_huds"); + mAutoTunePanel = getChild("panel_performance_autotune"); getChild("nearby_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mNearbyPanel)); getChild("complexity_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mComplexityPanel)); getChild("settings_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mSettingsPanel)); getChild("huds_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mHUDsPanel)); + auto tgt_panel = getChild("target_subpanel"); + if(tgt_panel) + { + tgt_panel->getChild("target_button")->setCommitCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mAutoTunePanel)); + // tgt_panel->getChild("fwd_lbl")->setShowCursorHand(false); + // tgt_panel->getChild("fwd_lbl")->setSoundFlags(LLView::MOUSE_UP); + // tgt_panel->getChild("fwd_lbl")->setClickedCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mAutoTunePanel)); + } initBackBtn(mNearbyPanel); initBackBtn(mComplexityPanel); initBackBtn(mSettingsPanel); initBackBtn(mHUDsPanel); + initBackBtn(mAutoTunePanel); mHUDList = mHUDsPanel->getChild("hud_list"); mHUDList->setNameListType(LLNameListCtrl::SPECIAL); @@ -129,15 +147,18 @@ BOOL LLFloaterPerformance::postBuild() mNearbyPanel->getChild("hide_avatars")->set(!LLPipeline::hasRenderTypeControl(LLPipeline::RENDER_TYPE_AVATAR)); mNearbyList = mNearbyPanel->getChild("nearby_list"); mNearbyList->setRightMouseDownCallback(boost::bind(&LLFloaterPerformance::onAvatarListRightClick, this, _1, _2, _3)); + + mNearbyCombo = mComplexityPanel->getChild("avatar_name_combo"); + mNearbyCombo->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickFocusAvatar, this)); updateComplexityText(); mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPerformance::updateComplexityText, this)); mNearbyPanel->getChild("IndirectMaxComplexity")->setCommitCallback(boost::bind(&LLFloaterPerformance::updateMaxComplexity, this)); updateMaxRenderTime(); - updateMaxRenderTimeText(); - mMaxARTChangedSignal = gSavedSettings.getControl("RenderAvatarMaxART")->getCommitSignal()->connect(boost::bind(&LLFloaterPerformance::updateMaxRenderTimeText, this)); - mNearbyPanel->getChild("RenderAvatarMaxART")->setCommitCallback(boost::bind(&LLFloaterPerformance::updateMaxRenderTime, this)); + // updateMaxRenderTimeText(); + mMaxARTChangedSignal = gSavedSettings.getControl("FSRenderAvatarMaxART")->getCommitSignal()->connect(boost::bind(&LLFloaterPerformance::updateMaxRenderTime, this)); + mNearbyPanel->getChild("FSRenderAvatarMaxART")->setCommitCallback(boost::bind(&LLFloaterPerformance::updateMaxRenderTime, this)); LLAvatarComplexityControls::setIndirectMaxArc(); @@ -173,41 +194,67 @@ void LLFloaterPerformance::draw() constexpr auto MILLIS = 1000; - static LLCachedControl fps_cap(gSavedSettings, "FramePerSecondLimit"); // user limited FPS - static LLCachedControl target_fps(gSavedSettings, "FSTargetFPS"); // desired FPS - static LLCachedControl auto_tune(gSavedSettings, "FSAutoTuneFPS"); // auto tune enabled? - static LLCachedControl max_render_cost(gSavedSettings, "RenderAvatarMaxART", 0); + static LLCachedControl fpsCap(gSavedSettings, "FramePerSecondLimit"); // user limited FPS + static LLCachedControl targetFPS(gSavedSettings, "FSTargetFPS"); // desired FPS + // static LLCachedControl autoTune(gSavedSettings, "FSAutoTuneFPS"); // auto tune enabled? + static LLCachedControl maxRenderCost(gSavedSettings, "FSRenderAvatarMaxART"); + if(maxRenderCost != FSPerfStats::renderAvatarMaxART) + { + gSavedSettings.setU32("FSRenderAvatarMaxART", FSPerfStats::renderAvatarMaxART); + } static auto freq_divisor = get_timer_info().mClockFrequencyInv; if (mUpdateTimer->hasExpired()) { + + LLStringUtil::format_map_t args; auto fps = LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, NUM_PERIODS); getChild("fps_value")->setValue((S32)llround(fps)); auto tot_frame_time_ns = NANOS/fps; - auto target_frame_time_ns = NANOS/(target_fps==0?1:target_fps); + auto target_frame_time_ns = NANOS/(targetFPS==0?1:targetFPS); + + FSPerfStats::bufferToggleLock.lock(); // prevent toggle for a moment + + // cumulative avatar time (includes idle processing, attachments and base av) auto tot_avatar_time_raw = FSPerfStats::StatsRecorder::getSum(AvType, FSPerfStats::StatType_t::RENDER_COMBINED); - auto tot_huds_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_HUDS); + // cumulative avatar render specific time (a bit arbitrary as the processing is too.) + auto tot_avatar_render_time_raw = tot_avatar_time_raw - FSPerfStats::StatsRecorder::getSum(AvType, FSPerfStats::StatType_t::RENDER_IDLE); + // the time spent this frame on the "display()" call. Treated as "tot time rendering" + auto tot_render_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_DISPLAY); + // sleep time is basically forced sleep when window out of focus auto tot_sleep_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_SLEEP); + // time spent on UI auto tot_ui_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_UI); + // cumulative time spent rendering HUDS + auto tot_huds_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_HUDS); + // "idle" time. This is the time spent in the idle poll section of the main loop, we DO NOT subtract the avatar time accumulated here as it was removed form the avatar time above auto tot_idle_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_IDLE); + // similar to sleep time, induced by FPS limit auto tot_limit_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_FPSLIMIT); + // swap time is time spent in swap buffer auto tot_swap_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_SWAP); - auto tot_avatar_time_ns = FSPerfStats::raw_to_ns( tot_avatar_time_raw ); - auto tot_huds_time_ns = FSPerfStats::raw_to_ns( tot_huds_time_raw ); - auto tot_sleep_time_ns = FSPerfStats::raw_to_ns( tot_sleep_time_raw ); - auto tot_ui_time_ns = FSPerfStats::raw_to_ns( tot_ui_time_raw ); - auto tot_idle_time_ns = FSPerfStats::raw_to_ns( tot_idle_time_raw ); - auto tot_limit_time_ns = FSPerfStats::raw_to_ns( tot_limit_time_raw ); - auto tot_swap_time_ns = FSPerfStats::raw_to_ns( tot_swap_time_raw ); + FSPerfStats::bufferToggleLock.unlock(); - // once the rest is extracted what is left is the scene cost - auto tot_scene_time_ns = tot_frame_time_ns - tot_avatar_time_ns - tot_huds_time_ns - tot_ui_time_ns - tot_sleep_time_ns - tot_limit_time_ns - tot_swap_time_ns - tot_idle_time_ns; - // remove time spent sleeping for fps limit or out of focus. - tot_frame_time_ns -= tot_limit_time_ns; - tot_frame_time_ns -= tot_sleep_time_ns; + + auto unreliable = false; // if there is something to skew the stats such as sleep of fps cap + auto tot_avatar_time_ns = FSPerfStats::raw_to_ns( tot_avatar_time_raw ); + auto tot_huds_time_ns = FSPerfStats::raw_to_ns( tot_huds_time_raw ); + auto tot_ui_time_ns = FSPerfStats::raw_to_ns( tot_ui_time_raw ); + + // auto tot_sleep_time_ns = FSPerfStats::raw_to_ns( tot_sleep_time_raw ); + // auto tot_limit_time_ns = FSPerfStats::raw_to_ns( tot_limit_time_raw ); + + // auto tot_render_time_ns = FSPerfStats::raw_to_ns( tot_render_time_raw ); + auto tot_idle_time_ns = FSPerfStats::raw_to_ns( tot_idle_time_raw ); + auto tot_swap_time_ns = FSPerfStats::raw_to_ns( tot_swap_time_raw ); + auto tot_non_av_render_time_ns = FSPerfStats::raw_to_ns( tot_render_time_raw - tot_avatar_render_time_raw); + + // // remove time spent sleeping for fps limit or out of focus. + // tot_frame_time_ns -= tot_limit_time_ns; + // tot_frame_time_ns -= tot_sleep_time_ns; if(tot_frame_time_ns == 0) { @@ -219,16 +266,23 @@ void LLFloaterPerformance::draw() auto pct_ui_time = (tot_ui_time_ns * 100)/tot_frame_time_ns; auto pct_idle_time = (tot_idle_time_ns * 100)/tot_frame_time_ns; auto pct_swap_time = (tot_swap_time_ns * 100)/tot_frame_time_ns; - auto pct_scene_time = (tot_scene_time_ns * 100)/tot_frame_time_ns; + auto pct_non_av_render_time = (tot_non_av_render_time_ns * 100)/tot_frame_time_ns; + pct_avatar_time = llclamp(pct_avatar_time,0.,100.); + pct_huds_time = llclamp(pct_huds_time,0.,100.); + pct_ui_time = llclamp(pct_ui_time,0.,100.); + pct_idle_time = llclamp(pct_idle_time,0.,100.); + pct_swap_time = llclamp(pct_swap_time,0.,100.); + pct_non_av_render_time = llclamp(pct_non_av_render_time,0.,100.); args["AV_FRAME_PCT"] = llformat("%02u", (U32)llround(pct_avatar_time)); args["HUDS_FRAME_PCT"] = llformat("%02u", (U32)llround(pct_huds_time)); args["UI_FRAME_PCT"] = llformat("%02u", (U32)llround(pct_ui_time)); args["IDLE_FRAME_PCT"] = llformat("%02u", (U32)llround(pct_idle_time)); args["SWAP_FRAME_PCT"] = llformat("%02u", (U32)llround(pct_swap_time)); - args["SCENE_FRAME_PCT"] = llformat("%02u", (U32)llround(pct_scene_time)); - args["FPSCAP"] = llformat("%02u", (U32)fps_cap); - args["FPSTARGET"] = llformat("%02u", (U32)target_fps); + args["SCENERY_FRAME_PCT"] = llformat("%02u", (U32)llround(pct_non_av_render_time)); + args["TOT_FRAME_TIME"] = llformat("%02u", (U32)llround(tot_frame_time_ns/1000000)); + args["FPSCAP"] = llformat("%02u", (U32)fpsCap); + args["FPSTARGET"] = llformat("%02u", (U32)targetFPS); getChild("av_frame_stats")->setText(getString("av_frame_pct", args)); getChild("huds_frame_stats")->setText(getString("huds_frame_pct", args)); @@ -240,14 +294,16 @@ void LLFloaterPerformance::draw() textbox->setVisible(true); textbox->setText(getString("focus_fps")); textbox->setColor(LLUIColorTable::instance().getColor("DrYellow")); + unreliable = true; } else if (tot_limit_time_raw > 0) { textbox->setVisible(true); textbox->setText(getString("limit_fps", args)); textbox->setColor(LLUIColorTable::instance().getColor("DrYellow")); + unreliable = true; } - else if(auto_tune) + else if(FSPerfStats::autoTune) { textbox->setVisible(true); textbox->setText(getString("tuning_fps", args)); @@ -258,59 +314,32 @@ void LLFloaterPerformance::draw() textbox->setVisible(false); } - if( auto_tune ) + if( FSPerfStats::autoTune && !unreliable ) { - auto av_render_max_raw = FSPerfStats::StatsRecorder::getMax(AvType, FSPerfStats::StatType_t::RENDER_COMBINED); - - // if( target_frame_time_ns <= tot_frame_time_ns ) - // { - // U32 non_avatar_time_ns = tot_frame_time_ns - tot_avatar_time_raw; - // if( non_avatar_time_ns < target_frame_time_ns ) - // { - // F32 target_avatar_time_ms {F32(target_frame_time_ns-non_avatar_time_ns)/1000000}; - // gSavedSettings.setF32( "RenderAvatarMaxART", target_avatar_time_ms / LLVOAvatar::sMaxNonImpostors ); - // LL_INFOS() << "AUTO_TUNE: Target frame time:"<= max_render_cost) - { - // we caught a bad frame possibly with a forced refresh render. - new_render_limit_ms = max_render_cost - 0.1; - } - gSavedSettings.setF32( "RenderAvatarMaxART", new_render_limit_ms); - LL_INFOS() << "AUTO_TUNE: avatar_budget adjusted to:" << new_render_limit_ms << LL_ENDL; - } - LL_INFOS() << "AUTO_TUNE: Target frame time:"<setColor(LLUIColorTable::instance().getColor("red")); } } - else - if( target_frame_time_ns > (tot_frame_time_ns + max_render_cost)) + else if( target_frame_time_ns > (tot_frame_time_ns + FSPerfStats::renderAvatarMaxART)) { // if we have more time to spare let's shift up little in the hope we'll restore an avatar. - gSavedSettings.setF32( "RenderAvatarMaxART", max_render_cost + 0.5 ); + textbox->setColor(LLUIColorTable::instance().getColor("green")); } } + if (mHUDsPanel->getVisible()) { populateHUDList(); @@ -342,6 +371,7 @@ void LLFloaterPerformance::hidePanels() mComplexityPanel->setVisible(FALSE); mHUDsPanel->setVisible(FALSE); mSettingsPanel->setVisible(FALSE); + mAutoTunePanel->setVisible(FALSE); } void LLFloaterPerformance::initBackBtn(LLPanel* panel) @@ -377,8 +407,7 @@ void LLFloaterPerformance::populateHUDList() for (iter = complexity_list.begin(); iter != end; ++iter) { LLHUDComplexity hud_object_complexity = *iter; - auto hud_ptr = hud_object_complexity.objectPtr; - auto hud_render_time_raw = FSPerfStats::StatsRecorder::get(HudType, hud_ptr->getID(), FSPerfStats::StatType_t::RENDER_GEOMETRY); + auto hud_render_time_raw = FSPerfStats::StatsRecorder::get(HudType, hud_object_complexity.objectId, FSPerfStats::StatType_t::RENDER_GEOMETRY); LLSD item; item["special_id"] = hud_object_complexity.objectId; item["target"] = LLNameListCtrl::SPECIAL; @@ -393,7 +422,7 @@ void LLFloaterPerformance::populateHUDList() row[1]["column"] = "complex_value"; row[1]["type"] = "text"; - LL_INFOS() << "HUD : hud[" << hud_ptr << " time:" << hud_render_time_raw <<" total_time:" << huds_max_render_time_raw << LL_ENDL; + // LL_INFOS() << "HUD : hud[" << hud_ptr << " time:" << hud_render_time_raw <<" total_time:" << huds_max_render_time_raw << LL_ENDL; row[1]["value"] = llformat( "%.3f",FSPerfStats::raw_to_us(hud_render_time_raw) ); row[1]["font"]["name"] = "SANSSERIF"; @@ -419,8 +448,14 @@ void LLFloaterPerformance::populateHUDList() void LLFloaterPerformance::populateObjectList() { + static auto freq_divisor = get_timer_info().mClockFrequencyInv; + S32 prev_pos = mObjectList->getScrollPos(); - LLUUID prev_selected_id = mObjectList->getSelectedSpecialId(); + auto prev_selected_id = mObjectList->getSelectedSpecialId(); + + std::string current_sort_col = mObjectList->getSortColumnName(); + BOOL current_sort_asc = mObjectList->getSortAscending(); + mObjectList->clearRows(); mObjectList->updateColumns(true); @@ -429,7 +464,6 @@ void LLFloaterPerformance::populateObjectList() object_complexity_list_t::iterator iter = complexity_list.begin(); object_complexity_list_t::iterator end = complexity_list.end(); - static auto freq_divisor = get_timer_info().mClockFrequencyInv; U32 max_complexity = 0; for (; iter != end; ++iter) @@ -437,52 +471,60 @@ void LLFloaterPerformance::populateObjectList() max_complexity = llmax(max_complexity, (*iter).objectCost); } - auto att_max_render_time_raw = FSPerfStats::StatsRecorder::getMax(AttType, FSPerfStats::StatType_t::RENDER_COMBINED); - - for (iter = complexity_list.begin(); iter != end; ++iter) { - LLObjectComplexity object_complexity = *iter; - S32 obj_cost_short = llmax((S32)object_complexity.objectCost / 1000, 1); - auto attach_render_time_raw = FSPerfStats::StatsRecorder::get(AttType, object_complexity.objectId, FSPerfStats::StatType_t::RENDER_COMBINED); - LLSD item; - item["special_id"] = object_complexity.objectId; - item["target"] = LLNameListCtrl::SPECIAL; - LLSD& row = item["columns"]; - row[0]["column"] = "art_visual"; - row[0]["type"] = "bar"; - LLSD& value = row[0]["value"]; - value["ratio"] = (F32)attach_render_time_raw / att_max_render_time_raw; - value["bottom"] = BAR_BOTTOM_PAD; - value["left_pad"] = BAR_LEFT_PAD; - value["right_pad"] = BAR_RIGHT_PAD; - - row[1]["column"] = "art_value"; - row[1]["type"] = "text"; - // row[1]["value"] = std::to_string(obj_cost_short); - row[1]["value"] = llformat( "%.4f", FSPerfStats::raw_to_us(attach_render_time_raw) ); - row[1]["font"]["name"] = "SANSSERIF"; - - row[2]["column"] = "complex_value"; - row[2]["type"] = "text"; - row[2]["value"] = std::to_string(obj_cost_short); - row[2]["font"]["name"] = "SANSSERIF"; - - row[3]["column"] = "name"; - row[3]["type"] = "text"; - row[3]["value"] = object_complexity.objectName; - row[3]["font"]["name"] = "SANSSERIF"; - - LLScrollListItem* obj = mObjectList->addElement(item); - if (obj) + std::lock_guard guard{FSPerfStats::bufferToggleLock}; + auto att_max_render_time_raw = FSPerfStats::StatsRecorder::getMax(AttType, FSPerfStats::StatType_t::RENDER_COMBINED); + LL_DEBUGS("PerfFloater") << "Attachments for frame : " << gFrameCount << " Max:" << att_max_render_time_raw << LL_ENDL; + for (iter = complexity_list.begin(); iter != end; ++iter) { - LLScrollListText* value_text = dynamic_cast(obj->getColumn(1)); - if (value_text) + LLObjectComplexity object_complexity = *iter; + S32 obj_cost_short = llmax((S32)object_complexity.objectCost / 1000, 1); + + auto& attID{object_complexity.objectId}; + auto& attName{object_complexity.objectName}; + auto attach_render_time_raw = FSPerfStats::StatsRecorder::get(AttType, attID, FSPerfStats::StatType_t::RENDER_COMBINED); + LL_DEBUGS("PerfFloater") << "Att: " << attName << " (" << attID.asString() << ") Cost: " << FSPerfStats::raw_to_us(attach_render_time_raw) << LL_ENDL; + LLSD item; + item["special_id"] = attID; + item["target"] = LLNameListCtrl::SPECIAL; + LLSD& row = item["columns"]; + row[0]["column"] = "art_visual"; + row[0]["type"] = "bar"; + LLSD& value = row[0]["value"]; + value["ratio"] = ((F32)attach_render_time_raw) / att_max_render_time_raw; + value["bottom"] = BAR_BOTTOM_PAD; + value["left_pad"] = BAR_LEFT_PAD; + value["right_pad"] = BAR_RIGHT_PAD; + + row[1]["column"] = "art_value"; + row[1]["type"] = "text"; + // row[1]["value"] = std::to_string(obj_cost_short); + row[1]["value"] = llformat( "%.4f", FSPerfStats::raw_to_us(attach_render_time_raw) ); + row[1]["font"]["name"] = "SANSSERIF"; + + row[2]["column"] = "complex_value"; + row[2]["type"] = "text"; + row[2]["value"] = std::to_string(obj_cost_short); + row[2]["font"]["name"] = "SANSSERIF"; + + row[3]["column"] = "name"; + row[3]["type"] = "text"; + row[3]["value"] = attName; + row[3]["font"]["name"] = "SANSSERIF"; + + LLScrollListItem* obj = mObjectList->addElement(item); + if (obj) { - value_text->setAlignment(LLFontGL::HCENTER); + LLScrollListText* value_text = dynamic_cast(obj->getColumn(1)); + if (value_text) + { + value_text->setAlignment(LLFontGL::HCENTER); + } } } } - mObjectList->sortByColumnIndex(1, FALSE); + LL_DEBUGS("PerfFloater") << "Attachments for frame : " << gFrameCount << " COMPLETED" << LL_ENDL; + mNearbyList->sortByColumn(current_sort_col, current_sort_asc); mObjectList->setScrollPos(prev_pos); mObjectList->selectItemBySpecialId(prev_selected_id); } @@ -491,18 +533,33 @@ void LLFloaterPerformance::populateNearbyList() { S32 prev_pos = mNearbyList->getScrollPos(); LLUUID prev_selected_id = mNearbyList->getStringUUIDSelectedItem(); + std::string current_sort_col = mNearbyList->getSortColumnName(); + BOOL current_sort_asc = mNearbyList->getSortAscending(); + if(current_sort_col == "art_visual") + { + current_sort_col = "art_value"; + current_sort_asc = false; + } + mNearbyList->clearRows(); mNearbyList->updateColumns(true); - static LLCachedControl max_render_cost(gSavedSettings, "RenderAvatarMaxART", 0); + static LLCachedControl maxRenderCost(gSavedSettings, "FSRenderAvatarMaxART", 0); updateMaxRenderTime(); - updateMaxRenderTimeText(); + // updateMaxRenderTimeText(); std::vector valid_nearby_avs; getNearbyAvatars(valid_nearby_avs); std::vector::iterator char_iter = valid_nearby_avs.begin(); + + FSPerfStats::bufferToggleLock.lock(); auto av_render_max_raw = FSPerfStats::StatsRecorder::getMax(AvType, FSPerfStats::StatType_t::RENDER_COMBINED); + FSPerfStats::bufferToggleLock.unlock(); + + FSPlot("max ART", (int64_t)av_render_max_raw); + FSPlot("Num av", (int64_t)valid_nearby_avs.size()); + while (char_iter != valid_nearby_avs.end()) { LLVOAvatar* avatar = dynamic_cast(*char_iter); @@ -513,9 +570,12 @@ void LLFloaterPerformance::populateNearbyList() continue; S32 complexity_short = llmax((S32)avatar->getVisualComplexity() / 1000, 1); + + FSPerfStats::bufferToggleLock.lock(); auto render_av_raw = FSPerfStats::StatsRecorder::get(AvType, avatar->getID(),FSPerfStats::StatType_t::RENDER_COMBINED); - auto is_slow = avatar->isTooSlow(true); - // auto is_slow_without_shadows = avatar->isTooSlow(); + FSPerfStats::bufferToggleLock.unlock(); + + auto is_slow = avatar->isTooSlowWithShadows(); LLSD item; item["id"] = avatar->getID(); @@ -523,6 +583,8 @@ void LLFloaterPerformance::populateNearbyList() row[0]["column"] = "art_visual"; row[0]["type"] = "bar"; LLSD& value = row[0]["value"]; + // The ratio used in the bar is the current cost, as soon as we take action this changes so we keep the + // pre-tune value for the numerical column and sorting. value["ratio"] = (double)render_av_raw / av_render_max_raw; value["bottom"] = BAR_BOTTOM_PAD; value["left_pad"] = BAR_LEFT_PAD; @@ -532,11 +594,11 @@ void LLFloaterPerformance::populateNearbyList() row[1]["type"] = "text"; if(is_slow) { - row[1]["value"] = llformat( "%.2f", FSPerfStats::raw_to_ms( avatar->getLastART() ) ); + row[1]["value"] = llformat( "%.2f", FSPerfStats::raw_to_us( avatar->getLastART() ) ); } else { - row[1]["value"] = llformat( "%.2f", FSPerfStats::raw_to_ms( render_av_raw ) ); + row[1]["value"] = llformat( "%.2f", FSPerfStats::raw_to_us( render_av_raw ) ); } row[1]["font"]["name"] = "SANSSERIF"; row[1]["width"] = "50"; @@ -547,21 +609,47 @@ void LLFloaterPerformance::populateNearbyList() row[2]["font"]["name"] = "SANSSERIF"; row[2]["width"] = "50"; - - row[3]["column"] = "name"; + row[3]["column"] = "state"; row[3]["type"] = "text"; - row[3]["value"] = avatar->getFullname(); + if(is_slow) + { + if( avatar->isTooSlowWithoutShadows() ) + { + row[3]["value"] = std::string{"I"}; + } + else + { + row[3]["value"] = std::string{"S"}; + } + } + else + { + row[3]["value"] = std::string{" "}; + } + row[3]["font"]["name"] = "SANSSERIF"; + row[4]["column"] = "name"; + LLScrollListItem* av_item = mNearbyList->addElement(item); if(av_item) { - LLScrollListText* value_text = dynamic_cast(av_item->getColumn(1)); + LLScrollListText* art_text = dynamic_cast(av_item->getColumn(1)); + if (art_text) + { + art_text->setAlignment(LLFontGL::RIGHT); + } + LLScrollListText* value_text = dynamic_cast(av_item->getColumn(2)); if (value_text) { - value_text->setAlignment(LLFontGL::HCENTER); + value_text->setAlignment(LLFontGL::RIGHT); } - LLScrollListText* name_text = dynamic_cast(av_item->getColumn(2)); + LLScrollListText* state_text = dynamic_cast(av_item->getColumn(3)); + if (state_text) + { + state_text->setAlignment(LLFontGL::HCENTER); + } + LLScrollListText* name_text = dynamic_cast(av_item->getColumn(4)); if (name_text) { if (avatar->isSelf()) @@ -591,7 +679,7 @@ void LLFloaterPerformance::populateNearbyList() } char_iter++; } - mNearbyList->sortByColumnIndex(1, FALSE); + mNearbyList->sortByColumn(current_sort_col, current_sort_asc); mNearbyList->setScrollPos(prev_pos); mNearbyList->selectByID(prev_selected_id); } @@ -650,6 +738,11 @@ void LLFloaterPerformance::onClickHideAvatars() LLPipeline::toggleRenderTypeControl(LLPipeline::RENDER_TYPE_AVATAR); } +void LLFloaterPerformance::onClickFocusAvatar() +{ + FSPerfStats::StatsRecorder::setFocusAv(mNearbyCombo->getSelectedValue().asUUID()); +} + void LLFloaterPerformance::onClickExceptions() { // [FS Persisted Avatar Render Settings] @@ -669,16 +762,16 @@ void LLFloaterPerformance::updateMaxComplexity() void LLFloaterPerformance::updateMaxRenderTime() { LLAvatarComplexityControls::updateMaxRenderTime( - mNearbyPanel->getChild("RenderAvatarMaxART"), - mNearbyPanel->getChild("RenderAvatarMaxARTText"), + mNearbyPanel->getChild("FSRenderAvatarMaxART"), + mNearbyPanel->getChild("FSRenderAvatarMaxARTText"), true); } void LLFloaterPerformance::updateMaxRenderTimeText() { LLAvatarComplexityControls::setRenderTimeText( - gSavedSettings.getF32("RenderAvatarMaxART"), - mNearbyPanel->getChild("RenderAvatarMaxARTText", true), + gSavedSettings.getU32("FSRenderAvatarMaxART"), + mNearbyPanel->getChild("FSRenderAvatarMaxARTText", true), true); } @@ -781,4 +874,153 @@ void LLFloaterPerformance::onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y) } } + +void LLFloaterPerformance::onExtendedAction(const LLSD& userdata, const LLUUID& av_id) +{ + const std::string command_name = userdata.asString(); + + LLViewerObject* objectp = gObjectList.findObject(av_id); + if (!objectp) + { + return; + } + auto avp = objectp->asAvatar(); + if ("inspect" == command_name) + { + for (LLVOAvatar::attachment_map_t::iterator iter = avp->mAttachmentPoints.begin(); + iter != avp->mAttachmentPoints.end(); + ++iter) + { + LLViewerJointAttachment* attachment = iter->second; + + if (!attachment) + { + continue; + } + + for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); + attachment_iter != attachment->mAttachedObjects.end(); + ++attachment_iter) + { + LLViewerObject* attached_object = attachment_iter->get(); + + if ( attached_object && !attached_object->isDead() ) + { + LLSelectMgr::getInstance()->selectObjectAndFamily(attached_object); + } + } + } + LLFloaterReg::showInstance("inspect"); + } + else if ("zoom" == command_name) + { + // Disable flycam if active. Without this, the requested look-at doesn't happen because the flycam code overrides all other camera motion. + bool fly_cam_status(LLViewerJoystick::getInstance()->getOverrideCamera()); + if (fly_cam_status) + { + LLViewerJoystick::getInstance()->setOverrideCamera(false); + LLPanelStandStopFlying::clearStandStopFlyingMode(LLPanelStandStopFlying::SSFM_FLYCAM); + // *NOTE: Above may not be the proper way to disable flycam. What I really want to do is just be able to move the camera and then leave the flycam in the the same state it was in, just moved to the new location. ~Cron + } + + LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); // Fixes an edge case where if the user has JUST disabled flycam themselves, the camera gets stuck waiting for input. + + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + + gAgentCamera.setLookAt(LOOKAT_TARGET_SELECT, objectp); + + // Place the camera looking at the object, along the line from the camera to the object, + // and sufficiently far enough away for the object to fill 3/4 of the screen, + // but not so close that the bbox's nearest possible vertex goes inside the near clip. + // Logic C&P'd from LLViewerMediaFocus::setCameraZoom() and then edited as needed + + LLBBox bbox = objectp->getBoundingBoxAgent(); + LLVector3d center(gAgent.getPosGlobalFromAgent(bbox.getCenterAgent())); + F32 height; + F32 width; + F32 depth; + F32 angle_of_view; + F32 distance; + + LLVector3d target_pos(center); + LLVector3d camera_dir(gAgentCamera.getCameraPositionGlobal() - target_pos); + camera_dir.normalize(); + + // We need the aspect ratio, and the 3 components of the bbox as height, width, and depth. + F32 aspect_ratio(LLViewerMediaFocus::getBBoxAspectRatio(bbox, LLVector3(camera_dir), &height, &width, &depth)); + F32 camera_aspect(LLViewerCamera::getInstance()->getAspect()); + + // We will normally use the side of the volume aligned with the short side of the screen (i.e. the height for + // a screen in a landscape aspect ratio), however there is an edge case where the aspect ratio of the object is + // more extreme than the screen. In this case we invert the logic, using the longer component of both the object + // and the screen. + bool invert((camera_aspect > 1.0f && aspect_ratio > camera_aspect) || (camera_aspect < 1.0f && aspect_ratio < camera_aspect)); + + // To calculate the optimum viewing distance we will need the angle of the shorter side of the view rectangle. + // In portrait mode this is the width, and in landscape it is the height. + // We then calculate the distance based on the corresponding side of the object bbox (width for portrait, height for landscape) + // We will add half the depth of the bounding box, as the distance projection uses the center point of the bbox. + if (camera_aspect < 1.0f || invert) + { + angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect()); + distance = width * 0.5 * 1.1 / tanf(angle_of_view * 0.5f); + } + else + { + angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView()); + distance = height * 0.5 * 1.1 / tanf(angle_of_view * 0.5f); + } + + distance += depth * 0.5; + + // Verify that the bounding box isn't inside the near clip. Using OBB-plane intersection to check if the + // near-clip plane intersects with the bounding box, and if it does, adjust the distance such that the + // object doesn't clip. + LLVector3d bbox_extents(bbox.getExtentLocal()); + LLVector3d axis_x = LLVector3d(1, 0, 0) * bbox.getRotation(); + LLVector3d axis_y = LLVector3d(0, 1, 0) * bbox.getRotation(); + LLVector3d axis_z = LLVector3d(0, 0, 1) * bbox.getRotation(); + //Normal of nearclip plane is camera_dir. + F32 min_near_clip_dist = bbox_extents.mdV[0] * (camera_dir * axis_x) + bbox_extents.mdV[1] * (camera_dir * axis_y) + bbox_extents.mdV[2] * (camera_dir * axis_z); // http://www.gamasutra.com/view/feature/131790/simple_intersection_tests_for_games.php?page=7 + F32 camera_to_near_clip_dist(LLViewerCamera::getInstance()->getNear()); + F32 min_camera_dist(min_near_clip_dist + camera_to_near_clip_dist); + if (distance < min_camera_dist) + { + // Camera is too close to object, some parts MIGHT clip. Move camera away to the position where clipping barely doesn't happen. + distance = min_camera_dist; + } + + LLVector3d camera_pos(target_pos + camera_dir * distance); + + if (camera_dir == LLVector3d::z_axis || camera_dir == LLVector3d::z_axis_neg) + { + // If the direction points directly up, the camera will "flip" around. + // We try to avoid this by adjusting the target camera position a + // smidge towards current camera position + // *NOTE: this solution is not perfect. All it attempts to solve is the + // "looking down" problem where the camera flips around when it animates + // to that position. You still are not guaranteed to be looking at the + // object in the correct orientation. What this solution does is it will + // put the camera into position keeping as best it can the current + // orientation with respect to the direction wanted. In other words, if + // before zoom the object appears "upside down" from the camera, after + /// zooming it will still be upside down, but at least it will not flip. + LLVector3d cur_camera_pos = LLVector3d(gAgentCamera.getCameraPositionGlobal()); + LLVector3d delta = (cur_camera_pos - camera_pos); + F64 len = delta.length(); + delta.normalize(); + // Move 1% of the distance towards original camera location + camera_pos += 0.01 * len * delta; + } + + gAgentCamera.setCameraPosAndFocusGlobal(camera_pos, target_pos, objectp->getID()); + + // *TODO: Re-enable joystick flycam if we disabled it earlier... Have to find some form of callback as re-enabling at this point causes the camera motion to not happen. ~Cron + //if (fly_cam_status) + //{ + // LLViewerJoystick::getInstance()->toggleFlycam(); + //} + } +} + // EOF diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/fsfloaterperformance.h similarity index 93% rename from indra/newview/llfloaterperformance.h rename to indra/newview/fsfloaterperformance.h index 0e1289df23..1fdbe4686f 100644 --- a/indra/newview/llfloaterperformance.h +++ b/indra/newview/fsfloaterperformance.h @@ -31,6 +31,7 @@ class LLCharacter; class LLNameListCtrl; +class LLComboBox; class LLFloaterPerformance : public LLFloater { @@ -51,6 +52,7 @@ public: void onCustomAction (const LLSD& userdata, const LLUUID& av_id); bool isActionChecked(const LLSD& userdata, const LLUUID& av_id); + void onExtendedAction(const LLSD& userdata, const LLUUID& av_id); private: void initBackBtn(LLPanel* panel); @@ -62,6 +64,7 @@ private: void onChangeQuality(const LLSD& data); void onClickHideAvatars(); void onClickExceptions(); + void onClickFocusAvatar(); void updateMaxComplexity(); void updateComplexityText(); @@ -75,9 +78,11 @@ private: LLPanel* mComplexityPanel; LLPanel* mHUDsPanel; LLPanel* mSettingsPanel; + LLPanel* mAutoTunePanel; LLNameListCtrl* mHUDList; LLNameListCtrl* mObjectList; LLNameListCtrl* mNearbyList; + LLComboBox* mNearbyCombo; LLListContextMenu* mContextMenu; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 2cc8d63343..b631cf74bc 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2874,36 +2874,30 @@ void LLAvatarComplexityControls::setText(U32 value, LLTextBox* text_box, bool sh } } +// redner time controls void LLAvatarComplexityControls::updateMaxRenderTime(LLSliderCtrl* slider, LLTextBox* value_label, bool short_val) { // Called when the IndirectMaxComplexity control changes // Responsible for fixing the slider label (IndirectMaxComplexityText) and setting RenderAvatarMaxComplexity - auto indirect_value = slider->getValue().asReal(); - gSavedSettings.setF32("RenderAvatarMaxART", indirect_value); - if(indirect_value == slider->getMaxValue()) - { - LLVOAvatar::sRenderTimeCap_ns = 0; - setRenderTimeText(0.0, value_label, short_val); - } - else - { - LLVOAvatar::sRenderTimeCap_ns = llround(indirect_value * 1000000); - setRenderTimeText(indirect_value, value_label, short_val); - } + auto indirect_value = slider->getValue().asInteger(); + gSavedSettings.setU32("FSRenderAvatarMaxART", indirect_value); + + LLVOAvatar::sRenderTimeLimit_ns = indirect_value * 1000; + setRenderTimeText(indirect_value, value_label, short_val); } -void LLAvatarComplexityControls::setRenderTimeText(F32 value, LLTextBox* text_box, bool short_val) +void LLAvatarComplexityControls::setRenderTimeText(U32 value, LLTextBox* text_box, bool short_val) { - if (0.0 == value) + if (0 == value) { text_box->setText(LLTrans::getString("no_limit")); } else { - text_box->setText(llformat("%.2f", value)); + text_box->setText(llformat("%u", value)); } } - +// void LLFloaterPreference::updateMaxComplexity() { // Called when the IndirectMaxComplexity control changes diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 008551f356..e8cc8c3a59 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -479,8 +479,10 @@ class LLAvatarComplexityControls public: static void updateMax(LLSliderCtrl* slider, LLTextBox* value_label, bool short_val = false); static void setText(U32 value, LLTextBox* text_box, bool short_val = false); + // for render time support static void updateMaxRenderTime(LLSliderCtrl* slider, LLTextBox* value_label, bool short_val = false); - static void setRenderTimeText(F32 value, LLTextBox* text_box, bool short_val = false); + static void setRenderTimeText(U32 value, LLTextBox* text_box, bool short_val = false); + // static void setIndirectControls(); static void setIndirectMaxNonImpostors(); static void setIndirectMaxArc(); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index fe175bcaf2..7893b557f6 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -107,7 +107,7 @@ #include "llviewerregion.h" #include "NACLantispam.h" #include "nd/ndlogthrottle.h" - +#include "fsperfstats.h" // Run Prio 0 default bento pose in the background to fix splayed hands, open mouths, etc. #include "llanimationstates.h" @@ -1059,6 +1059,41 @@ void handleDiskCacheSizeChanged(const LLSD& newValue) } // +// perrf floater stuffs +void handleTargetFPSChanged(const LLSD& newValue) +{ + const auto targetFPS = gSavedSettings.getU32("FSTargetFPS"); + FSPerfStats::targetFPS = targetFPS; +} + +// perrf floater stuffs +void handleAutoTuneFPSChanged(const LLSD& newValue) +{ + const auto newval = gSavedSettings.getBOOL("FSAutoTuneFPS"); + FSPerfStats::autoTune = newval; + if(gSavedSettings.getU32("FSRenderAvatarMaxART") == 0) + { + gSavedSettings.setU32("FSRenderAvatarMaxART",50000); + } +} + +void handleRenderAvatarMaxARTChanged(const LLSD& newValue) +{ + const auto newval = gSavedSettings.getU32("FSRenderAvatarMaxART"); + FSPerfStats::renderAvatarMaxART = newval; +} +void handlePerfSmoothingPeriodsChanged(const LLSD& newValue) +{ + const auto newval = gSavedSettings.getU32("FSPerfFloaterSmoothingPeriods"); + FSPerfStats::smoothingPeriods = newval; +} +void handleFPSTuningStrategyChanged(const LLSD& newValue) +{ + const auto newval = gSavedSettings.getU32("FSTuningFPSStrategy"); + FSPerfStats::fpsTuningStrategy = newval; +} +// + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -1313,6 +1348,14 @@ void settings_setup_listeners() // Better asset cache size control gSavedSettings.getControl("FSDiskCacheSize")->getSignal()->connect(boost::bind(&handleDiskCacheSizeChanged, _2)); + + // perf floater controls + gSavedSettings.getControl("FSTargetFPS")->getSignal()->connect(boost::bind(&handleTargetFPSChanged, _2)); + gSavedSettings.getControl("FSAutoTuneFPS")->getSignal()->connect(boost::bind(&handleAutoTuneFPSChanged, _2)); + gSavedSettings.getControl("FSRenderAvatarMaxART")->getSignal()->connect(boost::bind(&handleRenderAvatarMaxARTChanged, _2)); + gSavedSettings.getControl("FSRenderAvatarMaxART")->getSignal()->connect(boost::bind(&handlePerfSmoothingPeriodsChanged, _2)); + gSavedSettings.getControl("FSTuningFPSStrategy")->getSignal()->connect(boost::bind(&handleFPSTuningStrategyChanged, _2)); + // } #if TEST_CACHED_CONTROL diff --git a/indra/newview/skins/default/xui/en/floater_performance.xml b/indra/newview/skins/default/xui/en/floater_performance.xml index 30be14a0ab..5ca24181e3 100644 --- a/indra/newview/skins/default/xui/en/floater_performance.xml +++ b/indra/newview/skins/default/xui/en/floater_performance.xml @@ -1,13 +1,13 @@ - Scenery:[SCENE_FRAME_PCT]% Avatars:[AV_FRAME_PCT]% UI:[UI_FRAME_PCT]% HUDS:[HUDS_FRAME_PCT]% SWAP:[SWAP_FRAME_PCT]% TASKS:[IDLE_FRAME_PCT]% + Frame: [TOT_FRAME_TIME]ms - Scenery:[SCENERY_FRAME_PCT]% Avatars:[AV_FRAME_PCT]% UI:[UI_FRAME_PCT]% HUDS:[HUDS_FRAME_PCT]% SWAP:[SWAP_FRAME_PCT]% TASKS:[IDLE_FRAME_PCT]% FPS capped at [FPSCAP] fps @@ -27,14 +27,14 @@ - Frame breakdown will appear here. - + + + + Auto-Tune Frame Rate + + + + + Automatically adjust settings to maintain FPS + + + + + + + + - - - Target frame rate - - - Automatically tune display to give a smoother experience - - - - +top="115"> + top="115" /> + top="115" /> + top="115" /> + top="115" /> + diff --git a/indra/newview/skins/default/xui/en/menu_perf_avatar_rendering_settings.xml b/indra/newview/skins/default/xui/en/menu_perf_avatar_rendering_settings.xml new file mode 100644 index 0000000000..c60d72a587 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_perf_avatar_rendering_settings.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_performance_complexity.xml b/indra/newview/skins/default/xui/en/panel_performance_complexity.xml index c7201d8385..5d1dc79386 100644 --- a/indra/newview/skins/default/xui/en/panel_performance_complexity.xml +++ b/indra/newview/skins/default/xui/en/panel_performance_complexity.xml @@ -42,67 +42,75 @@ top_pad="10" name="attachments_title" width="195"> - Your avatar complexity + Avatar complexity - Attachments make your avatar more complex. If your avatar is very complex, some other - - - people may not see you in full detail, and your graphics speed may be reduced. Removing - - - heavy attachments that you don’t need can help. - + follows="left|top" + font="SansSerifSmall" + text_color="White" + height="18" + layout="topleft" + top_pad="5" + left="20" + name="attachments_desc1" + width="580"> + Attachments make your avatar more complex and slower to render. + + +This screen allows you to view the attachments of your own avatar. + + +You may remove your own attachments quickly and easily by hitting the 'X'. + - - diff --git a/indra/newview/skins/default/xui/en/panel_performance_huds.xml b/indra/newview/skins/default/xui/en/panel_performance_huds.xml index 1ba3c85776..df8aa130d4 100644 --- a/indra/newview/skins/default/xui/en/panel_performance_huds.xml +++ b/indra/newview/skins/default/xui/en/panel_performance_huds.xml @@ -66,7 +66,7 @@ left="20" name="huds_desc2" width="540"> - Note: Using a HUD's minimize button does not detach it. + Note: Using a HUD's minimize button does not detach it. Use the X to remove it. 0 - - - - - + Reducing or turning off water effects can greatly improve frame rate. - -