SL-18202 remove old autofps

master
Mnikolenko Productengine 2022-09-23 16:49:47 +03:00
parent 81c287f877
commit 3098d315a3
13 changed files with 10 additions and 321 deletions

View File

@ -16719,63 +16719,6 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>AutoFPS</key>
<map>
<key>Comment</key>
<string>
Allow dynamic adjustment of graphics preferences
</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AutoAdjustmentTimeout</key>
<map>
<key>Comment</key>
<string>Time before next iteration of automatic adjustments</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>5</real>
</map>
<key>InitialAdjustmentTimeout</key>
<map>
<key>Comment</key>
<string>Time before first iteration of automatic adjustments after login to the world, teleporting, maximizing Viewer etc.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>10</real>
</map>
<key>AutoFPSLowerBoundary</key>
<map>
<key>Comment</key>
<string>FPS lower boundary when automatic adjustments are occured to reduce graphics quality to increase FPS</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<real>30</real>
</map>
<key>AutoFPSUpperBoundary</key>
<map>
<key>Comment</key>
<string>FPS upper boundary when automatic adjustments are occured to increase graphics quality</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<real>50</real>
</map>
<key>TargetFPS</key>
<map>
<key>Comment</key>

View File

@ -4097,7 +4097,6 @@ void LLAgent::handleTeleportFinished()
}
}
gPipeline.setAdjustmentTimerExpiry(gSavedSettings.getF32("InitialAdjustmentTimeout"));
}
void LLAgent::handleTeleportFailed()
@ -4130,7 +4129,6 @@ void LLAgent::handleTeleportFailed()
mTPNeedsNeabyChatSeparator = false;
gPipeline.setAdjustmentTimerExpiry(gSavedSettings.getF32("InitialAdjustmentTimeout"));
}
/*static*/

View File

@ -58,7 +58,6 @@ const S32 BAR_BOTTOM_PAD = 9;
constexpr auto AvType {LLPerfStats::ObjType_t::OT_AVATAR};
constexpr auto AttType {LLPerfStats::ObjType_t::OT_ATTACHMENT};
constexpr auto HudType {LLPerfStats::ObjType_t::OT_HUD};
constexpr auto SceneType {LLPerfStats::ObjType_t::OT_GENERAL};
class LLExceptionsContextMenu : public LLListContextMenu
{
@ -87,8 +86,6 @@ LLFloaterPerformance::LLFloaterPerformance(const LLSD& key)
mNearbyMaxComplexity(0)
{
mContextMenu = new LLExceptionsContextMenu(this);
mCommitCallbackRegistrar.add("Pref.AutoAdjustWarning", boost::bind(&LLFloaterPreference::showAutoAdjustWarning));
}
LLFloaterPerformance::~LLFloaterPerformance()
@ -133,7 +130,6 @@ BOOL LLFloaterPerformance::postBuild()
mSettingsPanel->getChild<LLRadioGroup>("graphics_quality")->setCommitCallback(boost::bind(&LLFloaterPerformance::onChangeQuality, this, _2));
mSettingsPanel->getChild<LLCheckBoxCtrl>("advanced_lighting_model")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::onClickAdvancedLighting, this));
mSettingsPanel->getChild<LLComboBox>("ShadowDetail")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::onClickShadows, this));
mSettingsPanel->getChild<LLComboBox>("Reflections")->setMouseDownCallback(boost::bind(&LLFloaterPreference::showAutoAdjustWarning));
mNearbyPanel->getChild<LLButton>("exceptions_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickExceptions, this));
mNearbyPanel->getChild<LLCheckBoxCtrl>("hide_avatars")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickHideAvatars, this));
@ -623,16 +619,10 @@ void LLFloaterPerformance::onClickAdvancedLighting()
void LLFloaterPerformance::onClickShadows()
{
if (gSavedSettings.getBOOL("AutoFPS"))
if (!is_ALM_available() || !gSavedSettings.getBOOL("RenderDeferred"))
{
LLFloaterPreference::showAutoAdjustWarning();
}
else
{
if (!is_ALM_available() || !gSavedSettings.getBOOL("RenderDeferred"))
{
changeQualityLevel("ShadowsConfirm");
}
changeQualityLevel("ShadowsConfirm");
}
}
// EOF

View File

@ -305,7 +305,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.RememberedUsernames", boost::bind(&LLFloaterPreference::onClickRememberedUsernames, this));
mCommitCallbackRegistrar.add("Pref.SpellChecker", boost::bind(&LLFloaterPreference::onClickSpellChecker, this));
mCommitCallbackRegistrar.add("Pref.Advanced", boost::bind(&LLFloaterPreference::onClickAdvanced, this));
mCommitCallbackRegistrar.add("Pref.AutoAdjustWarning", boost::bind(&LLFloaterPreference::showAutoAdjustWarning));
sSkin = gSavedSettings.getString("SkinCurrent");
@ -1800,23 +1799,6 @@ void LLFloaterPreference::updateSearchableItems()
mSearchDataDirty = true;
}
void LLFloaterPreference::showAutoAdjustWarning()
{
static LLCachedControl<bool> use_auto_adjust(gSavedSettings,"AutoFPS");
if (use_auto_adjust)
{
LLNotificationsUtil::add("AutoFPSConfirmDisable", LLSD(), LLSD(),
[](const LLSD&notif, const LLSD&resp)
{
S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
if (opt == 0)
{
gSavedSettings.setBOOL("AutoFPS", FALSE);
}
});
}
}
void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
{
LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue()));

View File

@ -109,8 +109,6 @@ public:
void updateClickActionViews();
void updateSearchableItems();
static void showAutoAdjustWarning();
void onBtnOK(const LLSD& userdata);
void onBtnCancel(const LLSD& userdata);

View File

@ -49,8 +49,6 @@ LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const L
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxNonImpostors", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxNonImpostors,this));
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity,this));
mCommitCallbackRegistrar.add("Pref.AutoAdjustWarning", boost::bind(&LLFloaterPreference::showAutoAdjustWarning));
mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnCancel, this, _2));
mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnOK, this, _2));
@ -81,9 +79,6 @@ BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild()
mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this));
getChild<LLComboBox>("ShadowDetail")->setMouseDownCallback(boost::bind(&LLFloaterPreference::showAutoAdjustWarning));
getChild<LLComboBox>("Reflections")->setMouseDownCallback(boost::bind(&LLFloaterPreference::showAutoAdjustWarning));
return TRUE;
}

View File

@ -2254,10 +2254,6 @@ bool idle_startup()
if (STATE_CLEANUP == LLStartUp::getStartupState())
{
if (gAgent.isFirstLogin())
{
gSavedSettings.setBOOL("AutoFPS", TRUE);
}
set_startup_status(1.0, "", "");
display_startup();

View File

@ -1024,8 +1024,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gPipeline.clearReferences();
gPipeline.rebuildGroups();
gPipeline.autoAdjustSettings();
}
LLAppViewer::instance()->pingMainloopTimeout("Display:FrameStats");

View File

@ -409,8 +409,7 @@ LLPipeline::LLPipeline() :
mLightMovingMask(0),
mLightingDetail(0),
mScreenWidth(0),
mScreenHeight(0),
mUpdateTimer(new LLTimer())
mScreenHeight(0)
{
mNoiseMap = 0;
mTrueNoiseMap = 0;
@ -615,12 +614,10 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("CameraDoFResScale");
connectRefreshCachedSettingsSafe("RenderAutoHideSurfaceAreaLimit");
gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
gSavedSettings.getControl("AutoFPS")->getCommitSignal()->connect(boost::bind(&LLPipeline::onToggleAutoFPS));
}
LLPipeline::~LLPipeline()
{
delete mUpdateTimer;
}
void LLPipeline::cleanup()
@ -11522,141 +11519,3 @@ void LLPipeline::handleShadowDetailChanged()
}
}
const F32 MIN_DRAW_DISTANCE = 64;
const F32 MAX_DRAW_DISTANCE = 256;
void update_far_clip(F32 fps_dif)
{
F32 DIST_PER_FRAME_DIF = 16;
F32 new_far_clip = llclamp(LLPipeline::RenderFarClip - llmin(fps_dif * DIST_PER_FRAME_DIF, (F32)128), MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE);
gSavedSettings.setF32("RenderFarClip", new_far_clip);
}
void update_max_non_impostors(F32 fps_dif, S32 max_avatars)
{
const F32 IMPOSTORS_PER_FRAME_DIF = 0.5;
U32 new_non_imp = (U32)llclamp((S32)(LLVOAvatar::sMaxNonImpostors - llmin((S32)(fps_dif / IMPOSTORS_PER_FRAME_DIF), 10)), 1, max_avatars);
gSavedSettings.setU32("RenderAvatarMaxNonImpostors", new_non_imp);
}
void LLPipeline::autoAdjustSettings()
{
static LLCachedControl<bool> use_auto_adjustment(gSavedSettings,"AutoFPS");
if (!use_auto_adjustment)
{
return;
}
if (LLStartUp::getStartupState() < STATE_STARTED || LLApp::isExiting())
{
return;
}
static LLCachedControl<F32> adjustment_timeout(gSavedSettings, "AutoAdjustmentTimeout");
static LLCachedControl<F32> initial_adjustment_timeout(gSavedSettings, "InitialAdjustmentTimeout");
static LLCachedControl<S32> fps_lower_boundary(gSavedSettings, "AutoFPSLowerBoundary");
static LLCachedControl<S32> fps_upper_boundary(gSavedSettings, "AutoFPSUpperBoundary");
if (gViewerWindow && gViewerWindow->getWindow()->getVisible()
&& gFocusMgr.getAppHasFocus() && !gTeleportDisplay)
{
static bool is_init = false;
if (!is_init)
{
//wait for FPS to stabilize after login in-world
mUpdateTimer->setTimerExpirySec((F32)initial_adjustment_timeout);
is_init = true;
}
if (mUpdateTimer->hasExpired())
{
mUpdateTimer->setTimerExpirySec((F32)adjustment_timeout);
const S32 FPS_STAT_PERIODS = 50;
S32 fps = (S32)llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, FPS_STAT_PERIODS));
if (fps < fps_lower_boundary)
{
S32 fps_dif = fps_lower_boundary - fps;
if (sWaterReflections && RenderReflectionDetail > WATER_REFLECT_NONE_WATER_OPAQUE)
{
S32 reflection_detail = llclamp(RenderReflectionDetail - 1, WATER_REFLECT_NONE_WATER_OPAQUE, WATER_REFLECT_MINIMAL);
gSavedSettings.setS32("RenderReflectionDetail", reflection_detail);
return;
}
if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0 && RenderShadowSplits > 0)
{
S32 shadow_splits = llclamp(RenderShadowSplits - 1, 0, 3);
gSavedSettings.setS32("RenderShadowSplits", shadow_splits);
return;
}
if (RenderFarClip > MIN_DRAW_DISTANCE)
{
update_far_clip(fps_dif);
}
std::vector<LLCharacter*> valid_nearby_avs;
LLWorld::getInstance()->getNearbyAvatarsAndCompl(valid_nearby_avs);
if (valid_nearby_avs.size() > 1 && LLVOAvatar::sMaxNonImpostors > 1)
{
update_max_non_impostors(fps_dif, valid_nearby_avs.size());
}
}
else if (fps > fps_upper_boundary)
{
S32 fps_dif = fps_upper_boundary - fps;
std::vector<LLCharacter*> valid_nearby_avs;
LLWorld::getInstance()->getNearbyAvatarsAndCompl(valid_nearby_avs);
if (valid_nearby_avs.size() > 1 && (LLVOAvatar::sMaxNonImpostors < valid_nearby_avs.size()))
{
update_max_non_impostors(fps_dif, valid_nearby_avs.size());
return;
}
if (RenderFarClip < MAX_DRAW_DISTANCE)
{
update_far_clip(fps_dif);
}
if (LLPipeline::sRenderDeferred && RenderShadowDetail > 0 && RenderShadowSplits < 3)
{
S32 shadow_splits = llclamp(RenderShadowSplits + 1, 0, 3);
gSavedSettings.setS32("RenderShadowSplits", shadow_splits);
return;
}
if (sWaterReflections && RenderReflectionDetail < WATER_REFLECT_MINIMAL)
{
S32 reflection_detail = llclamp(RenderReflectionDetail + 1, WATER_REFLECT_NONE_WATER_OPAQUE, WATER_REFLECT_MINIMAL);
gSavedSettings.setS32("RenderReflectionDetail", reflection_detail);
}
}
}
}
else
{
//wait for FPS to stabilize if the window was minimized or not focused before
mUpdateTimer->setTimerExpirySec((F32)initial_adjustment_timeout);
}
}
void LLPipeline::setAdjustmentTimerExpiry(F32 expiration)
{
mUpdateTimer->setTimerExpirySec(expiration);
}
void LLPipeline::onToggleAutoFPS()
{
if (!gSavedSettings.getBOOL("AutoFPS"))
{
//reset the number of shadow map splits rendered, when disabling auto-fps
//probably should be removed, if we'll have actual UI control for this setting
gSavedSettings.setS32("RenderShadowSplits", 3);
}
}

View File

@ -418,8 +418,6 @@ public:
static void updateRenderDeferred();
static void refreshCachedSettings();
static void onToggleAutoFPS();
void addDebugBlip(const LLVector3& position, const LLColor4& color);
void hidePermanentObjects( std::vector<U32>& restoreList );
@ -429,9 +427,6 @@ public:
void restoreHiddenObject( const LLUUID& id );
void handleShadowDetailChanged();
void autoAdjustSettings();
void setAdjustmentTimerExpiry(F32 expiration);
private:
void unloadShaders();
void addToQuickLookup( LLDrawPool* new_poolp );
@ -724,8 +719,6 @@ protected:
U64 mOldRenderDebugMask;
std::stack<U32> mRenderDebugFeatureStack;
LLTimer* mUpdateTimer;
/////////////////////////////////////////////
//
//

View File

@ -40,8 +40,6 @@
name="DrawDistance"
top_delta="16"
width="330">
<slider.mouse_down_callback
function="Pref.AutoAdjustWarning" />
</slider>
<text
type="string"
@ -185,8 +183,6 @@
<slider.commit_callback
function="Pref.UpdateIndirectMaxNonImpostors"
parameter="IndirectNonImpostorsText" />
<slider.mouse_down_callback
function="Pref.AutoAdjustWarning" />
</slider>
<text
type="string"

View File

@ -61,39 +61,6 @@
top_pad="8"
left="20"
width="540"/>
<text
follows="left|top"
font="SansSerifSmall"
text_color="White"
height="18"
layout="topleft"
top_pad="20"
left="20"
name="auto_lbl"
width="105">
Automatic settings
</text>
<check_box
control_name="AutoFPS"
height="16"
initial_value="true"
label="Allow system to choose settings for best experience"
label_text.text_color="White"
label_text.v_pad="-1"
label_text.h_pad="3"
layout="topleft"
left_pad="30"
name="AutoFPS"
width="256">
</check_box>
<view_border
bevel_style="in"
height="0"
layout="topleft"
name="border1"
left="20"
top_pad="12"
width="540"/>
<text
follows="left|top"
font="SansSerifSmall"
@ -240,8 +207,6 @@
name="draw_distance"
left_pad="5"
width="250">
<slider.mouse_down_callback
function="Pref.AutoAdjustWarning" />
</slider>
<text
type="string"
@ -520,7 +485,7 @@
font="SansSerifSmall"
height="18"
layout="topleft"
top="130"
top="80"
left="213"
name="1_lbl"
width="7">

View File

@ -30,28 +30,7 @@
width="120">
(None)
</text>
<view_border
bevel_style="in"
height="0"
layout="topleft"
name="border1"
left="12"
top_pad="12"
width="477"/>
<check_box
control_name="AutoFPS"
height="16"
initial_value="true"
label="Allow system to choose settings for best experience"
label_text.text_color="White"
label_text.v_pad="-1"
label_text.h_pad="5"
layout="topleft"
left="10"
name="AutoFPS"
top_delta="15"
width="256">
</check_box>
<text
type="string"
length="1"
@ -60,7 +39,7 @@
layout="topleft"
left="10"
name="QualitySpeed"
top_delta="30"
top_delta="35"
width="400">
Quality &amp; speed:
</text>
@ -238,10 +217,7 @@
max_val="512"
name="DrawDistance"
top_delta="40"
width="330">
<slider.mouse_down_callback
function="Pref.AutoAdjustWarning" />
</slider>
width="330" />
<text
type="string"
length="1"
@ -282,7 +258,7 @@
<check_box.commit_callback
function="Pref.RenderOptionUpdate" />
</check_box>
<slider
control_name="IndirectMaxComplexity"
tool_tip="Controls at what point a visually complex avatar is drawn as a JellyDoll"
@ -298,7 +274,7 @@
max_val="101"
name="IndirectMaxComplexity"
show_text="false"
top_delta="34"
top_delta="60"
width="300">
<slider.commit_callback
function="Pref.UpdateIndirectMaxComplexity"