rename llfloaterperformance.cpp as it will not appear in current form
Adds the various controls and other supporting settings.master
parent
8557385707
commit
feab5f9bf9
|
|
@ -397,7 +397,8 @@ set(viewer_SOURCE_FILES
|
|||
llfloaterpathfindinglinksets.cpp
|
||||
llfloaterpathfindingobjects.cpp
|
||||
llfloaterpay.cpp
|
||||
llfloaterperformance.cpp
|
||||
# llfloaterperformance.cpp <FS:Beq/> 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 <FS:Beq/> replaced with fs version due to large changes and likelihood that LL version will not release.
|
||||
fsfloaterperformance.h
|
||||
llfloaterperms.h
|
||||
llfloaterpostprocess.h
|
||||
llfloaterpreference.h
|
||||
|
|
|
|||
|
|
@ -8171,7 +8171,7 @@
|
|||
<key>Comment</key>
|
||||
<string>Duration in seconds of the login SRV request timeout</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
|
|
@ -25717,12 +25717,23 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Comment</key>
|
||||
<string>Allow the viewer to adjust your settings to achieve target FPS</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSPerfFloaterSmoothingPeriods</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of periods to smooth the stats over</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>50</integer>
|
||||
</map>
|
||||
<key>FSAutoUnmuteSounds</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -25756,10 +25767,10 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderAvatarUseART</key>
|
||||
<key>FSPerfStatsCaptureEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use Avatar Render Time (ART) instead of complexity (ARC) (true)</string>
|
||||
<string>Enable/disable render time data to support autotune.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -25767,16 +25778,27 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderAvatarMaxART</key>
|
||||
<key>FSRenderAvatarMaxART</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Render Time Limit in microseconds (0.0 = no limit)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<real>0.0</real>
|
||||
<integer>50</integer>
|
||||
</map>
|
||||
<key>FSTuningFPSStrategy</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Stategy to use when tuning FPS. 0=Tune avatar rendering only, 1=Tune both avatar and global scene settings.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -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<LLPanel>("panel_performance_complexity");
|
||||
mSettingsPanel = getChild<LLPanel>("panel_performance_preferences");
|
||||
mHUDsPanel = getChild<LLPanel>("panel_performance_huds");
|
||||
mAutoTunePanel = getChild<LLPanel>("panel_performance_autotune");
|
||||
|
||||
getChild<LLPanel>("nearby_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mNearbyPanel));
|
||||
getChild<LLPanel>("complexity_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mComplexityPanel));
|
||||
getChild<LLPanel>("settings_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mSettingsPanel));
|
||||
getChild<LLPanel>("huds_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mHUDsPanel));
|
||||
auto tgt_panel = getChild<LLPanel>("target_subpanel");
|
||||
if(tgt_panel)
|
||||
{
|
||||
tgt_panel->getChild<LLButton>("target_button")->setCommitCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mAutoTunePanel));
|
||||
// tgt_panel->getChild<LLTextBox>("fwd_lbl")->setShowCursorHand(false);
|
||||
// tgt_panel->getChild<LLTextBox>("fwd_lbl")->setSoundFlags(LLView::MOUSE_UP);
|
||||
// tgt_panel->getChild<LLTextBox>("fwd_lbl")->setClickedCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mAutoTunePanel));
|
||||
}
|
||||
|
||||
initBackBtn(mNearbyPanel);
|
||||
initBackBtn(mComplexityPanel);
|
||||
initBackBtn(mSettingsPanel);
|
||||
initBackBtn(mHUDsPanel);
|
||||
initBackBtn(mAutoTunePanel);
|
||||
|
||||
mHUDList = mHUDsPanel->getChild<LLNameListCtrl>("hud_list");
|
||||
mHUDList->setNameListType(LLNameListCtrl::SPECIAL);
|
||||
|
|
@ -129,15 +147,18 @@ BOOL LLFloaterPerformance::postBuild()
|
|||
mNearbyPanel->getChild<LLCheckBoxCtrl>("hide_avatars")->set(!LLPipeline::hasRenderTypeControl(LLPipeline::RENDER_TYPE_AVATAR));
|
||||
mNearbyList = mNearbyPanel->getChild<LLNameListCtrl>("nearby_list");
|
||||
mNearbyList->setRightMouseDownCallback(boost::bind(&LLFloaterPerformance::onAvatarListRightClick, this, _1, _2, _3));
|
||||
|
||||
mNearbyCombo = mComplexityPanel->getChild<LLComboBox>("avatar_name_combo");
|
||||
mNearbyCombo->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickFocusAvatar, this));
|
||||
|
||||
updateComplexityText();
|
||||
mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPerformance::updateComplexityText, this));
|
||||
mNearbyPanel->getChild<LLSliderCtrl>("IndirectMaxComplexity")->setCommitCallback(boost::bind(&LLFloaterPerformance::updateMaxComplexity, this));
|
||||
|
||||
updateMaxRenderTime();
|
||||
updateMaxRenderTimeText();
|
||||
mMaxARTChangedSignal = gSavedSettings.getControl("RenderAvatarMaxART")->getCommitSignal()->connect(boost::bind(&LLFloaterPerformance::updateMaxRenderTimeText, this));
|
||||
mNearbyPanel->getChild<LLSliderCtrl>("RenderAvatarMaxART")->setCommitCallback(boost::bind(&LLFloaterPerformance::updateMaxRenderTime, this));
|
||||
// updateMaxRenderTimeText();
|
||||
mMaxARTChangedSignal = gSavedSettings.getControl("FSRenderAvatarMaxART")->getCommitSignal()->connect(boost::bind(&LLFloaterPerformance::updateMaxRenderTime, this));
|
||||
mNearbyPanel->getChild<LLSliderCtrl>("FSRenderAvatarMaxART")->setCommitCallback(boost::bind(&LLFloaterPerformance::updateMaxRenderTime, this));
|
||||
|
||||
LLAvatarComplexityControls::setIndirectMaxArc();
|
||||
|
||||
|
|
@ -173,41 +194,67 @@ void LLFloaterPerformance::draw()
|
|||
constexpr auto MILLIS = 1000;
|
||||
|
||||
|
||||
static LLCachedControl<U32> fps_cap(gSavedSettings, "FramePerSecondLimit"); // user limited FPS
|
||||
static LLCachedControl<U32> target_fps(gSavedSettings, "FSTargetFPS"); // desired FPS
|
||||
static LLCachedControl<bool> auto_tune(gSavedSettings, "FSAutoTuneFPS"); // auto tune enabled?
|
||||
static LLCachedControl<F32> max_render_cost(gSavedSettings, "RenderAvatarMaxART", 0);
|
||||
static LLCachedControl<U32> fpsCap(gSavedSettings, "FramePerSecondLimit"); // user limited FPS
|
||||
static LLCachedControl<U32> targetFPS(gSavedSettings, "FSTargetFPS"); // desired FPS
|
||||
// static LLCachedControl<bool> autoTune(gSavedSettings, "FSAutoTuneFPS"); // auto tune enabled?
|
||||
static LLCachedControl<U32> 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<LLTextBox>("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<LLTextBox>("av_frame_stats")->setText(getString("av_frame_pct", args));
|
||||
getChild<LLTextBox>("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:"<<target_frame_time_ns/1000000 << " (non_avatar is " << non_avatar_time_ns/1000000 << ") Avatar budget=" << max_render_cost << " x " << LLVOAvatar::sMaxNonImpostors << LL_ENDL;
|
||||
// }
|
||||
// }
|
||||
// the tuning itself is managed from another thread but we can report progress here
|
||||
|
||||
// Is our target frame time lower than current? If so we need to take action to reduce draw overheads.
|
||||
if( target_frame_time_ns <= tot_frame_time_ns )
|
||||
{
|
||||
LL_INFOS() << "AUTO_TUNE: adapting frame rate" << LL_ENDL;
|
||||
U32 non_avatar_time_ns = tot_frame_time_ns - tot_avatar_time_ns;
|
||||
LL_INFOS() << "AUTO_TUNE: adapting frame rate: target_frame=" << target_frame_time_ns << " nonav_frame_time=" << non_avatar_time_ns << " headroom=" << (S64)target_frame_time_ns - non_avatar_time_ns << LL_ENDL;
|
||||
// If the target frame time < non avatar frame time then we can pototentially reach it.
|
||||
if( non_avatar_time_ns < target_frame_time_ns )
|
||||
{
|
||||
U64 target_avatar_time_ns {target_frame_time_ns-non_avatar_time_ns};
|
||||
LL_INFOS() << "AUTO_TUNE: avatar_budget:" << target_avatar_time_ns << LL_ENDL;
|
||||
if(target_avatar_time_ns < tot_avatar_time_ns)
|
||||
{
|
||||
F32 new_render_limit_ms = (F32)(FSPerfStats::raw_to_ms(av_render_max_raw)-0.1);
|
||||
if(new_render_limit_ms >= 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:"<<target_frame_time_ns/1000000 << "ms (non_avatar is " << non_avatar_time_ns/1000000 << "ms) Max cost limited=" << max_render_cost << LL_ENDL;
|
||||
textbox->setColor(LLUIColorTable::instance().getColor("orange"));
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO(Beq): Set advisory text for further actions
|
||||
LL_INFOS() << "AUTO_TUNE: Unachievable target . Target frame time:"<<target_frame_time_ns/1000000 << "ms (non_avatar is " << non_avatar_time_ns/1000000 << "ms)" << LL_ENDL;
|
||||
textbox->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<std::mutex> 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<LLScrollListText*>(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<LLScrollListText*>(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<F32> max_render_cost(gSavedSettings, "RenderAvatarMaxART", 0);
|
||||
static LLCachedControl<U32> maxRenderCost(gSavedSettings, "FSRenderAvatarMaxART", 0);
|
||||
updateMaxRenderTime();
|
||||
updateMaxRenderTimeText();
|
||||
// updateMaxRenderTimeText();
|
||||
|
||||
std::vector<LLCharacter*> valid_nearby_avs;
|
||||
getNearbyAvatars(valid_nearby_avs);
|
||||
|
||||
std::vector<LLCharacter*>::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<LLVOAvatar*>(*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<LLScrollListText*>(av_item->getColumn(1));
|
||||
LLScrollListText* art_text = dynamic_cast<LLScrollListText*>(av_item->getColumn(1));
|
||||
if (art_text)
|
||||
{
|
||||
art_text->setAlignment(LLFontGL::RIGHT);
|
||||
}
|
||||
LLScrollListText* value_text = dynamic_cast<LLScrollListText*>(av_item->getColumn(2));
|
||||
if (value_text)
|
||||
{
|
||||
value_text->setAlignment(LLFontGL::HCENTER);
|
||||
value_text->setAlignment(LLFontGL::RIGHT);
|
||||
}
|
||||
LLScrollListText* name_text = dynamic_cast<LLScrollListText*>(av_item->getColumn(2));
|
||||
LLScrollListText* state_text = dynamic_cast<LLScrollListText*>(av_item->getColumn(3));
|
||||
if (state_text)
|
||||
{
|
||||
state_text->setAlignment(LLFontGL::HCENTER);
|
||||
}
|
||||
LLScrollListText* name_text = dynamic_cast<LLScrollListText*>(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:Ansariel> [FS Persisted Avatar Render Settings]
|
||||
|
|
@ -669,16 +762,16 @@ void LLFloaterPerformance::updateMaxComplexity()
|
|||
void LLFloaterPerformance::updateMaxRenderTime()
|
||||
{
|
||||
LLAvatarComplexityControls::updateMaxRenderTime(
|
||||
mNearbyPanel->getChild<LLSliderCtrl>("RenderAvatarMaxART"),
|
||||
mNearbyPanel->getChild<LLTextBox>("RenderAvatarMaxARTText"),
|
||||
mNearbyPanel->getChild<LLSliderCtrl>("FSRenderAvatarMaxART"),
|
||||
mNearbyPanel->getChild<LLTextBox>("FSRenderAvatarMaxARTText"),
|
||||
true);
|
||||
}
|
||||
|
||||
void LLFloaterPerformance::updateMaxRenderTimeText()
|
||||
{
|
||||
LLAvatarComplexityControls::setRenderTimeText(
|
||||
gSavedSettings.getF32("RenderAvatarMaxART"),
|
||||
mNearbyPanel->getChild<LLTextBox>("RenderAvatarMaxARTText", true),
|
||||
gSavedSettings.getU32("FSRenderAvatarMaxART"),
|
||||
mNearbyPanel->getChild<LLTextBox>("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
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -2874,36 +2874,30 @@ void LLAvatarComplexityControls::setText(U32 value, LLTextBox* text_box, bool sh
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:Beq> 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));
|
||||
}
|
||||
}
|
||||
|
||||
// </FS:Beq>
|
||||
void LLFloaterPreference::updateMaxComplexity()
|
||||
{
|
||||
// Called when the IndirectMaxComplexity control changes
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
// <FS:Beq> 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);
|
||||
// </FS:Beq>
|
||||
static void setIndirectControls();
|
||||
static void setIndirectMaxNonImpostors();
|
||||
static void setIndirectMaxArc();
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
#include "llviewerregion.h"
|
||||
#include "NACLantispam.h"
|
||||
#include "nd/ndlogthrottle.h"
|
||||
|
||||
#include "fsperfstats.h"
|
||||
// <FS:Zi> 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)
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Beq> perrf floater stuffs
|
||||
void handleTargetFPSChanged(const LLSD& newValue)
|
||||
{
|
||||
const auto targetFPS = gSavedSettings.getU32("FSTargetFPS");
|
||||
FSPerfStats::targetFPS = targetFPS;
|
||||
}
|
||||
|
||||
// <FS:Beq> 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;
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void settings_setup_listeners()
|
||||
|
|
@ -1313,6 +1348,14 @@ void settings_setup_listeners()
|
|||
|
||||
// <FS:Ansariel> Better asset cache size control
|
||||
gSavedSettings.getControl("FSDiskCacheSize")->getSignal()->connect(boost::bind(&handleDiskCacheSizeChanged, _2));
|
||||
|
||||
// <FS:Beq> 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));
|
||||
// </FS:Beq>
|
||||
}
|
||||
|
||||
#if TEST_CACHED_CONTROL
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
height="592"
|
||||
height="652"
|
||||
layout="topleft"
|
||||
name="performance"
|
||||
save_rect="true"
|
||||
title="Improve Graphics Speed"
|
||||
width="580">
|
||||
<floater.string name="frame_stats">
|
||||
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]%
|
||||
</floater.string>
|
||||
<floater.string name="limit_fps">
|
||||
FPS capped at [FPSCAP] fps
|
||||
|
|
@ -27,14 +27,14 @@
|
|||
<panel
|
||||
bevel_style="none"
|
||||
follows="left|top"
|
||||
height="540"
|
||||
height="600"
|
||||
width="580"
|
||||
name="panel_top"
|
||||
visible="true"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
top="0">
|
||||
<panel
|
||||
<panel
|
||||
bg_alpha_color="black"
|
||||
background_visible="true"
|
||||
background_opaque="false"
|
||||
|
|
@ -115,7 +115,109 @@
|
|||
width="520">
|
||||
Frame breakdown will appear here.
|
||||
</text>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel
|
||||
bg_alpha_color="PanelGray"
|
||||
background_visible="true"
|
||||
background_opaque="false"
|
||||
border="true"
|
||||
bevel_style="none"
|
||||
follows="left|top"
|
||||
height="50"
|
||||
width="560"
|
||||
name="target_subpanel"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
top_pad="5">
|
||||
<text
|
||||
follows="left|top"
|
||||
font="SansSerifLarge"
|
||||
text_color="White"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="settings_lbl"
|
||||
top="7"
|
||||
width="180">
|
||||
Auto-Tune Frame Rate
|
||||
</text>
|
||||
<check_box
|
||||
control_name="FSAutoTuneFPS"
|
||||
height="16"
|
||||
initial_value="false"
|
||||
label="Auto tune for FPS"
|
||||
layout="topleft"
|
||||
left_pad="100"
|
||||
name="AutoTuneFPS"
|
||||
top_delta="0"
|
||||
tool_tip="FS will attempt to adjust settings to meet the target FPS."
|
||||
width="50">
|
||||
</check_box>
|
||||
<text
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
text_color="White"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="settings_desc"
|
||||
top_pad="3"
|
||||
width="275">
|
||||
Automatically adjust settings to maintain FPS
|
||||
</text>
|
||||
<combo_box
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
text_color="White"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left_pad="5"
|
||||
control_name="FSTuningFPSStrategy"
|
||||
name="FSTuningFPSStrategy"
|
||||
top_delta="0"
|
||||
width="150">
|
||||
<combo_box.item
|
||||
label="Tune Avatars Only"
|
||||
name="av_only"
|
||||
value="0" />
|
||||
<combo_box.item
|
||||
label="Avatar and scene"
|
||||
name="av_and_scene"
|
||||
value="1" />
|
||||
</combo_box>
|
||||
<spinner
|
||||
name="target_fps"
|
||||
control_name="FSTargetFPS"
|
||||
font="SansSerifLarge"
|
||||
tooltip="Target FPS - The desired FPS level. The system will attempt to achieve this by adjusting your graphics settings."
|
||||
layout="topleft"
|
||||
follows="left|right|top"
|
||||
right="-55"
|
||||
top_pad="-32"
|
||||
height="40"
|
||||
visible="true"
|
||||
decimal_digits="0"
|
||||
increment="1"
|
||||
initial_value="25"
|
||||
max_val="200"
|
||||
min_val="1"
|
||||
width="40"
|
||||
label="" />
|
||||
<button
|
||||
height="16"
|
||||
width="16"
|
||||
layout="topleft"
|
||||
mouse_opaque="true"
|
||||
follows="right|top"
|
||||
name="target_btn"
|
||||
top="19"
|
||||
image_selected="Arrow_Right_Off"
|
||||
image_pressed="Arrow_Right_Off"
|
||||
image_unselected="Arrow_Right_Off"
|
||||
right="-12"
|
||||
is_toggle="true">
|
||||
</button>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel
|
||||
bevel_style="none"
|
||||
|
|
@ -126,71 +228,7 @@ name="panel_performance_main"
|
|||
visible="true"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
top="60">
|
||||
<panel
|
||||
bg_alpha_color="PanelGray"
|
||||
background_visible="true"
|
||||
background_opaque="false"
|
||||
border="true"
|
||||
bevel_style="none"
|
||||
follows="left|top"
|
||||
height="50"
|
||||
width="560"
|
||||
name="target_subpanel"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
top="5">
|
||||
<text
|
||||
follows="left|top"
|
||||
font="SansSerifLarge"
|
||||
text_color="White"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="settings_lbl"
|
||||
top="7"
|
||||
width="180">
|
||||
Target frame rate
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
text_color="White"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="settings_desc"
|
||||
top_pad="0"
|
||||
width="350">
|
||||
Automatically tune display to give a smoother experience
|
||||
</text>
|
||||
<spinner
|
||||
name="target_fps"
|
||||
control_name="FSTargetFPS"
|
||||
font="SansSerifLarge"
|
||||
layout="topleft"
|
||||
follows="left|right|top"
|
||||
right="-55"
|
||||
top_pad="-32"
|
||||
height="40"
|
||||
visible="true"
|
||||
decimal_digits="0"
|
||||
increment="1"
|
||||
initial_value="25"
|
||||
max_val="200"
|
||||
min_val="1"
|
||||
width="40"
|
||||
label="" />
|
||||
<icon
|
||||
height="16"
|
||||
width="16"
|
||||
image_name="Arrow_Right_Off"
|
||||
mouse_opaque="true"
|
||||
name="icon_arrow3"
|
||||
follows="right|top"
|
||||
top="19"
|
||||
right="-20"/>
|
||||
</panel>
|
||||
top="115">
|
||||
<panel
|
||||
bg_alpha_color="PanelGray"
|
||||
background_visible="true"
|
||||
|
|
@ -436,7 +474,7 @@ HUDs
|
|||
left="0"
|
||||
name="panel_performance_nearby"
|
||||
visible="false"
|
||||
top="55" />
|
||||
top="115" />
|
||||
<panel
|
||||
filename="panel_performance_complexity.xml"
|
||||
follows="all"
|
||||
|
|
@ -444,7 +482,7 @@ HUDs
|
|||
left="0"
|
||||
name="panel_performance_complexity"
|
||||
visible="false"
|
||||
top="55" />
|
||||
top="115" />
|
||||
<panel
|
||||
filename="panel_performance_preferences.xml"
|
||||
follows="all"
|
||||
|
|
@ -452,7 +490,7 @@ HUDs
|
|||
left="0"
|
||||
name="panel_performance_preferences"
|
||||
visible="false"
|
||||
top="55" />
|
||||
top="115" />
|
||||
<panel
|
||||
filename="panel_performance_huds.xml"
|
||||
follows="all"
|
||||
|
|
@ -460,5 +498,13 @@ HUDs
|
|||
left="0"
|
||||
name="panel_performance_huds"
|
||||
visible="false"
|
||||
top="55" />
|
||||
top="115" />
|
||||
<panel
|
||||
filename="panel_performance_autotune.xml"
|
||||
follows="all"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="panel_performance_autotune"
|
||||
visible="false"
|
||||
top="115" />
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<context_menu
|
||||
layout="topleft"
|
||||
name="Settings">
|
||||
<menu_item_check
|
||||
label="Always full detail"
|
||||
layout="topleft"
|
||||
name="always_render">
|
||||
<on_click function="Settings.SetRendering" parameter="always"/>
|
||||
<on_check function="Settings.IsSelected" parameter="always" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Never full detail"
|
||||
layout="topleft"
|
||||
name="never_render">
|
||||
<on_click function="Settings.SetRendering" parameter="never"/>
|
||||
<on_check function="Settings.IsSelected" parameter="never" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Remove from exceptions"
|
||||
layout="topleft"
|
||||
name="default">
|
||||
<on_click function="Settings.SetRendering" parameter="default"/>
|
||||
<on_check function="Settings.IsSelected" parameter="default" />
|
||||
<on_visible function="Settings.IsSelected" parameter="non_default" />
|
||||
</menu_item_check>
|
||||
<menu_item_separator />
|
||||
<menu_item_call
|
||||
label="Inspect Avatar"
|
||||
name="inspect">
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.Extended" parameter="inspect"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Cam to Avatar"
|
||||
name="zoom">
|
||||
<menu_item_call.on_click
|
||||
function="Avatar.Extended" parameter="zoom"/>
|
||||
</menu_item_call>
|
||||
</context_menu>
|
||||
|
|
@ -42,67 +42,75 @@
|
|||
top_pad="10"
|
||||
name="attachments_title"
|
||||
width="195">
|
||||
Your avatar complexity
|
||||
Avatar complexity
|
||||
</text>
|
||||
<text
|
||||
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. If your avatar is very complex, some other
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
font="SansSerifSmall"
|
||||
text_color="White"
|
||||
height="18"
|
||||
layout="topleft"
|
||||
top_pad="3"
|
||||
left="20"
|
||||
name="attachments_desc2"
|
||||
width="580">
|
||||
people may not see you in full detail, and your graphics speed may be reduced. Removing
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
font="SansSerifSmall"
|
||||
text_color="White"
|
||||
height="18"
|
||||
layout="topleft"
|
||||
top_pad="3"
|
||||
left="20"
|
||||
name="attachments_desc3"
|
||||
width="580">
|
||||
heavy attachments that you don’t need can help.
|
||||
</text>
|
||||
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.
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
font="SansSerifSmall"
|
||||
text_color="White"
|
||||
height="18"
|
||||
layout="topleft"
|
||||
top_pad="3"
|
||||
left="20"
|
||||
name="attachments_desc2"
|
||||
width="580">
|
||||
This screen allows you to view the attachments of your own avatar.
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
font="SansSerifSmall"
|
||||
text_color="White"
|
||||
height="18"
|
||||
layout="topleft"
|
||||
top_pad="3"
|
||||
left="20"
|
||||
name="attachments_desc3"
|
||||
width="580">
|
||||
You may remove your own attachments quickly and easily by hitting the 'X'.
|
||||
</text>
|
||||
<name_list
|
||||
column_padding="0"
|
||||
draw_stripes="true"
|
||||
height="379"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
name="obj_list"
|
||||
top_pad="10"
|
||||
left="20"
|
||||
column_padding="0"
|
||||
draw_stripes="true"
|
||||
draw_heading="true"
|
||||
height="379"
|
||||
follows="left|top"
|
||||
sort_column="1"
|
||||
sort_ascending="false"
|
||||
multi_select="false"
|
||||
layout="topleft"
|
||||
name="obj_list"
|
||||
top_pad="10"
|
||||
width="540">
|
||||
<name_list.columns
|
||||
label=""
|
||||
name="art_visual"
|
||||
width="90" />
|
||||
<name_list.columns
|
||||
label=""
|
||||
label="Time (μs)"
|
||||
name="art_value"
|
||||
tool_tip="Time taken to render this attachment (microseconds)"
|
||||
width="80" />
|
||||
<name_list.columns
|
||||
label=""
|
||||
<name_list.columns
|
||||
label="ARC"
|
||||
name="complex_value"
|
||||
tool_tip="Conventional item complexity (ARC)"
|
||||
width="40" />
|
||||
<name_list.columns
|
||||
label=""
|
||||
<name_list.columns
|
||||
label="Attachment name"
|
||||
tool_tip="click the 'X' to detach"
|
||||
name="name"/>
|
||||
</name_list>
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
</text>
|
||||
<name_list
|
||||
column_padding="0"
|
||||
|
|
|
|||
|
|
@ -90,19 +90,19 @@
|
|||
0
|
||||
</text>
|
||||
<slider
|
||||
control_name="RenderAvatarMaxART"
|
||||
control_name="FSRenderAvatarMaxART"
|
||||
tool_tip="Controls when a visually complex avatar is considered to be taking too long to render"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
initial_value="10.0"
|
||||
increment="0.01"
|
||||
label="Maximum render time (ms)"
|
||||
initial_value="10000"
|
||||
increment="10"
|
||||
label="Maximum render time (microsecs)"
|
||||
text_color="White"
|
||||
label_width="165"
|
||||
layout="topleft"
|
||||
min_val="0.01"
|
||||
max_val="50.0"
|
||||
name="RenderAvatarMaxART"
|
||||
min_val="0.00"
|
||||
max_val="50000"
|
||||
name="FSRenderAvatarMaxART"
|
||||
show_text="false"
|
||||
left_delta="-304"
|
||||
top_delta="-16"
|
||||
|
|
@ -117,30 +117,19 @@
|
|||
top_delta="0"
|
||||
left_delta="304"
|
||||
text_color="White"
|
||||
name="RenderAvatarMaxARTText"
|
||||
name="FSRenderAvatarMaxARTText"
|
||||
width="65">
|
||||
0
|
||||
</text>
|
||||
<check_box
|
||||
control_name="FSAutoTuneFPS"
|
||||
height="16"
|
||||
initial_value="false"
|
||||
label="Auto tune for FPS"
|
||||
layout="topleft"
|
||||
left_pad="5"
|
||||
name="AutoTuneFPS"
|
||||
top_delta="0"
|
||||
tool_tip="FS will attempt to adjust settings to meet the target FPS."
|
||||
width="50">
|
||||
</check_box>
|
||||
<name_list
|
||||
column_padding="0"
|
||||
column_padding="1"
|
||||
draw_stripes="true"
|
||||
draw_heading="true"
|
||||
height="280"
|
||||
left="20"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
sort_column="complex_value"
|
||||
sort_column="art_value"
|
||||
short_names="true"
|
||||
name="nearby_list"
|
||||
name_column="name"
|
||||
|
|
@ -148,18 +137,26 @@
|
|||
width="540">
|
||||
<name_list.columns
|
||||
label=""
|
||||
tool_tip="bar graph showing current render time (includes auto-tuning) as % of slowest."
|
||||
name="art_visual"
|
||||
width="90" />
|
||||
<name_list.columns
|
||||
label=""
|
||||
<name_list.columns
|
||||
label="ART (μs)"
|
||||
tool_tip="Avater Render Time. Actual time taken to render this avatar before any auto-tuning (in microseconds)."
|
||||
name="art_value"
|
||||
width="80" />
|
||||
<name_list.columns
|
||||
label=""
|
||||
<name_list.columns
|
||||
label="ARC"
|
||||
tool_tip="Old school complexity (ARC) based on standard SL rules."
|
||||
name="complex_value"
|
||||
width="40" />
|
||||
<name_list.columns
|
||||
<name_list.columns
|
||||
label=""
|
||||
tool_tip="Shows any auto-tuning. I=Imposter S=no shadow."
|
||||
name="state"
|
||||
width="15" />
|
||||
<name_list.columns
|
||||
label="Name"
|
||||
name="name"/>
|
||||
</name_list>
|
||||
<text
|
||||
|
|
|
|||
|
|
@ -362,17 +362,6 @@
|
|||
width="350">
|
||||
Reducing or turning off water effects can greatly improve frame rate.
|
||||
</text>
|
||||
<check_box
|
||||
control_name="RenderTransparentWater"
|
||||
height="16"
|
||||
initial_value="true"
|
||||
label="Transparent Water"
|
||||
layout="topleft"
|
||||
name="TransparentWater"
|
||||
top_delta="24"
|
||||
left="157"
|
||||
width="280">
|
||||
</check_box>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
|
|
|
|||
Loading…
Reference in New Issue