# Conflicts:
#	indra/cmake/Copy3rdPartyLibs.cmake
#	indra/cmake/OpenJPEG.cmake
#	indra/integration_tests/llui_libtest/CMakeLists.txt
#	indra/newview/CMakeLists.txt
#	indra/newview/app_settings/settings.xml
#	indra/newview/featuretable_mac.txt
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llperfstats.cpp
#	indra/newview/llperfstats.h
#	indra/newview/llstartup.cpp
#	indra/newview/llvoavatar.cpp
#	indra/newview/pipeline.cpp
#	indra/newview/skins/default/xui/en/floater_performance.xml
#	indra/newview/skins/default/xui/en/panel_performance_complexity.xml
#	indra/newview/skins/default/xui/en/panel_performance_huds.xml
#	indra/newview/skins/default/xui/en/panel_performance_preferences.xml
#	indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
master
Ansariel 2023-02-03 17:15:04 +01:00
commit 24db83c554
19 changed files with 285 additions and 50 deletions

View File

@ -272,6 +272,7 @@ elseif(LINUX)
libfreetype.so.6.6.2
libfreetype.so.6
libhunspell-1.3.so.0.0.0
libopenjp2.so
libuuid.so.16
libuuid.so.16.0.22
libfontconfig.so.1.10.1
@ -347,6 +348,6 @@ if(DARWIN)
# that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE
# directories.
add_custom_command( TARGET stage_third_party_libs POST_BUILD
COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources
COMMAND ${CMAKE_COMMAND} -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources
)
endif()

View File

@ -6,5 +6,6 @@ add_library( ll::openjpeg INTERFACE IMPORTED )
use_system_binary(openjpeg)
use_prebuilt_binary(openjpeg)
target_link_libraries(ll::openjpeg INTERFACE openjp2 )
target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/openjpeg)

View File

@ -22032,6 +22032,17 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>KeepAutoTuneLock</key>
<map>
<key>Comment</key>
<string>When enabled the AutoTuneLock will be maintainted all following sessions.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AllowSelfImpostor</key>
@ -22142,7 +22153,7 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>0</integer>
<integer>1</integer>
</map>
<key>CameraOpacity</key>
<map>

View File

@ -69,6 +69,7 @@
// <FS:Zi> We don't use the mini location panel in Firestorm
// #include "llpaneltopinfobar.h"
#include "llparcel.h"
#include "llperfstats.h"
#include "llrendersphere.h"
#include "llscriptruntimeperms.h"
#include "llsdutil.h"
@ -4886,7 +4887,7 @@ void LLAgent::handleTeleportFinished()
mRegionp->setCapabilitiesReceivedCallback(boost::bind(&LLAgent::onCapabilitiesReceivedAfterTeleport));
}
}
LLPerfStats::tunables.autoTuneTimeout = true;
}
void LLAgent::handleTeleportFailed()
@ -4919,6 +4920,7 @@ void LLAgent::handleTeleportFailed()
mTPNeedsNeabyChatSeparator = false;
LLPerfStats::tunables.autoTuneTimeout = true;
}
/*static*/

View File

@ -127,6 +127,7 @@ BOOL LLFloaterPerformance::postBuild()
mObjectList->setIconClickedCallback(boost::bind(&LLFloaterPerformance::detachItem, this, _1));
mSettingsPanel->getChild<LLButton>("advanced_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickAdvanced, this));
mSettingsPanel->getChild<LLButton>("defaults_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickDefaults, this));
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));
@ -147,6 +148,16 @@ BOOL LLFloaterPerformance::postBuild()
gSavedSettings.setF32("AutoTuneRenderFarClipTarget", LLPipeline::RenderFarClip);
}
LLStringExplicit fps_limit(llformat("%d", gViewerWindow->getWindow()->getRefreshRate()));
mAutoadjustmentsPanel->getChild<LLTextBox>("vsync_desc_limit")->setTextArg("[FPS_LIMIT]", fps_limit);
mAutoadjustmentsPanel->getChild<LLTextBox>("display_desc")->setTextArg("[FPS_LIMIT]", fps_limit);
mAutoadjustmentsPanel->getChild<LLButton>("defaults_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickDefaults, this));
mStartAutotuneBtn = mAutoadjustmentsPanel->getChild<LLButton>("start_autotune");
mStopAutotuneBtn = mAutoadjustmentsPanel->getChild<LLButton>("stop_autotune");
mStartAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::startAutotune, this));
mStopAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::stopAutotune, this));
return TRUE;
}
@ -194,14 +205,10 @@ void LLFloaterPerformance::draw()
populateObjectList();
}
auto button = getChild<LLButton>("AutoTuneFPS");
if((bool)button->getToggleState() != LLPerfStats::tunables.userAutoTuneEnabled)
{
button->toggleState();
}
mUpdateTimer->setTimerExpirySec(REFRESH_INTERVAL);
}
updateAutotuneCtrls(LLPerfStats::tunables.userAutoTuneEnabled);
LLFloater::draw();
}
@ -477,6 +484,15 @@ void LLFloaterPerformance::onClickAdvanced()
LLFloaterReg::showInstance("prefs_graphics_advanced");
}
void LLFloaterPerformance::onClickDefaults()
{
LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
if (instance)
{
instance->setRecommendedSettings();
}
}
void LLFloaterPerformance::onChangeQuality(const LLSD& data)
{
LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
@ -635,4 +651,25 @@ void LLFloaterPerformance::onClickShadows()
}
}
void LLFloaterPerformance::startAutotune()
{
LLPerfStats::tunables.userAutoTuneEnabled = true;
}
void LLFloaterPerformance::stopAutotune()
{
LLPerfStats::tunables.userAutoTuneEnabled = false;
}
void LLFloaterPerformance::updateAutotuneCtrls(bool autotune_enabled)
{
static LLCachedControl<bool> auto_tune_locked(gSavedSettings, "AutoTuneLock");
mStartAutotuneBtn->setEnabled(!autotune_enabled && !auto_tune_locked);
mStopAutotuneBtn->setEnabled(autotune_enabled && !auto_tune_locked);
getChild<LLCheckBoxCtrl>("AutoTuneContinuous")->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked));
getChild<LLTextBox>("wip_desc")->setVisible(autotune_enabled && !auto_tune_locked);
getChild<LLTextBox>("display_desc")->setVisible(LLPerfStats::tunables.vsyncEnabled);
}
// EOF

View File

@ -61,12 +61,17 @@ private:
void setFPSText();
void onClickAdvanced();
void onClickDefaults();
void onChangeQuality(const LLSD& data);
void onClickHideAvatars();
void onClickExceptions();
void onClickShadows();
void onClickAdvancedLighting();
void startAutotune();
void stopAutotune();
void updateAutotuneCtrls(bool autotune_enabled);
void updateMaxRenderTime();
static void changeQualityLevel(const std::string& notif);
@ -81,6 +86,9 @@ private:
LLNameListCtrl* mObjectList;
LLNameListCtrl* mNearbyList;
LLButton* mStartAutotuneBtn;
LLButton* mStopAutotuneBtn;
LLListContextMenu* mContextMenu;
LLTimer* mUpdateTimer;

View File

@ -1378,6 +1378,13 @@ void LLFloaterPreference::setHardwareDefaults()
// saveSettings(); // save here to be able to return to the previous preset by Cancel
//}
// </FS:Ansariel>
setRecommendedSettings();
}
void LLFloaterPreference::setRecommendedSettings()
{
resetAutotuneSettings();
gSavedSettings.getControl("RenderVSyncEnable")->resetToDefault(true);
LLFeatureManager::getInstance()->applyRecommendedSettings();
@ -1402,6 +1409,28 @@ void LLFloaterPreference::setHardwareDefaults()
}
}
void LLFloaterPreference::resetAutotuneSettings()
{
gSavedSettings.setBOOL("AutoTuneFPS", FALSE);
const std::string autotune_settings[] = {
"AutoTuneLock",
"KeepAutoTuneLock",
"TargetFPS",
"TuningFPSStrategy",
"AutoTuneImpostorByDistEnabled",
"AutoTuneImpostorFarAwayDistance" ,
"AutoTuneRenderFarClipMin",
"AutoTuneRenderFarClipTarget",
"RenderAvatarMaxART"
};
for (auto it : autotune_settings)
{
gSavedSettings.getControl(it)->resetToDefault(true);
}
}
void LLFloaterPreference::getControlNames(std::vector<std::string>& names)
{
LLView* view = findChild<LLView>("display");

View File

@ -297,6 +297,9 @@ public:
// <FS:Zi> Support preferences search SLURLs
void onCopySearch();
void setRecommendedSettings();
void resetAutotuneSettings();
private:
void onDeleteTranscripts();

View File

@ -34,6 +34,8 @@
#include "llbutton.h"
#include "lltabcontainer.h"
#include "llfloater.h"
//#include "llfloaterperformance.h"
#include "fsfloaterperformance.h"
#include "llfloaterreg.h"
#include "llpresetsmanager.h"
#include "llsliderctrl.h"
@ -48,6 +50,7 @@
LLPanelPresetsPulldown::LLPanelPresetsPulldown()
{
mCommitCallbackRegistrar.add("Presets.GoGraphicsPrefs", boost::bind(&LLPanelPresetsPulldown::onGraphicsButtonClick, this, _2));
mCommitCallbackRegistrar.add("Presets.GoAutofpsPrefs", boost::bind(&LLPanelPresetsPulldown::onAutofpsButtonClick, this, _2));
mCommitCallbackRegistrar.add("Presets.RowClick", boost::bind(&LLPanelPresetsPulldown::onRowClick, this, _2));
buildFromFile( "panel_presets_pulldown.xml");
@ -155,3 +158,15 @@ void LLPanelPresetsPulldown::onGraphicsButtonClick(const LLSD& user_data)
}
}
}
void LLPanelPresetsPulldown::onAutofpsButtonClick(const LLSD& user_data)
{
setVisible(FALSE);
//LLFloaterPerformance* performance_floater = LLFloaterReg::showTypedInstance<LLFloaterPerformance>("performance");
FSFloaterPerformance* performance_floater = LLFloaterReg::showTypedInstance<FSFloaterPerformance>("performance");
if (performance_floater)
{
//performance_floater->showAutoadjustmentsPanel();
performance_floater->showMainPanel();
}
}

View File

@ -41,6 +41,7 @@ class LLPanelPresetsPulldown : public LLPanelPulldown
private:
void onGraphicsButtonClick(const LLSD& user_data);
void onAutofpsButtonClick(const LLSD& user_data);
void onRowClick(const LLSD& user_data);
std::list<std::string> mPresetNames;

View File

@ -29,7 +29,9 @@
#include "llcontrol.h"
#include "pipeline.h"
#include "llagentcamera.h"
#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "llwindow.h"
#include "llworld.h"
#include <llthread.h>
@ -51,15 +53,19 @@ namespace LLPerfStats
std::atomic<U64> renderAvatarMaxART_ns{(U64)(ART_UNLIMITED_NANOS)}; // highest render time we'll allow without culling features
bool belowTargetFPS{false};
U32 lastGlobalPrefChange{0};
U32 lastSleepedFrame{0};
U64 meanFrameTime{0};
std::mutex bufferToggleLock{};
F64 cpu_hertz{0.0};
U32 vsync_max_fps{60};
Tunables tunables;
std::atomic<int> StatsRecorder::writeBuffer{0};
bool StatsRecorder::collectionEnabled{true};
LLUUID StatsRecorder::focusAv{LLUUID::null};
bool StatsRecorder::autotuneInit{false};
std::array<StatsRecorder::StatsTypeMatrix,2> StatsRecorder::statsDoubleBuffer{ {} };
std::array<StatsRecorder::StatsSummaryArray,2> StatsRecorder::max{ {} };
std::array<StatsRecorder::StatsSummaryArray,2> StatsRecorder::sum{ {} };
@ -125,9 +131,23 @@ namespace LLPerfStats
LLPerfStats::tunables.userImpostorDistanceTuningEnabled = gSavedSettings.getBOOL("AutoTuneImpostorByDistEnabled");
LLPerfStats::tunables.userFPSTuningStrategy = gSavedSettings.getU32("TuningFPSStrategy");
LLPerfStats::tunables.userTargetFPS = gSavedSettings.getU32("TargetFPS");
LLPerfStats::tunables.vsyncEnabled = gSavedSettings.getBOOL("RenderVSyncEnable");
LLPerfStats::tunables.userTargetReflections = gSavedSettings.getS32("UserTargetReflections");
LLPerfStats::tunables.userAutoTuneEnabled = gSavedSettings.getBOOL("AutoTuneFPS");
LLPerfStats::tunables.userAutoTuneLock = gSavedSettings.getBOOL("AutoTuneLock");
LLPerfStats::tunables.userAutoTuneLock = gSavedSettings.getBOOL("AutoTuneLock") && gSavedSettings.getU32("KeepAutoTuneLock");
if(gSavedSettings.getBOOL("AutoTuneLock") && !gSavedSettings.getU32("KeepAutoTuneLock"))
{
gSavedSettings.setBOOL("AutoTuneLock", FALSE);
}
LLPerfStats::tunables.userAutoTuneEnabled = LLPerfStats::tunables.userAutoTuneLock;
if (LLPerfStats::tunables.userAutoTuneEnabled && !gSavedSettings.getBOOL("AutoTuneFPS"))
{
gSavedSettings.setBOOL("AutoTuneFPS", TRUE);
}
// Note: The Max ART slider is logarithmic and thus we have an intermediate proxy value
updateRenderCostLimitFromSettings();
resetChanges();
@ -139,7 +159,7 @@ namespace LLPerfStats
// create a thread to consume from the queue
tunables.initialiseFromSettings();
LLPerfStats::cpu_hertz = (F64)LLTrace::BlockTimer::countsPerSecond();
LLPerfStats::vsync_max_fps = gViewerWindow->getWindow()->getRefreshRate();
t.detach();
}
@ -245,7 +265,7 @@ namespace LLPerfStats
}
// and now adjust the proxy vars so that the main thread can adjust the visuals.
if(tunables.userAutoTuneEnabled)
if(autotuneInit && tunables.userAutoTuneEnabled)
{
updateAvatarParams();
}
@ -309,9 +329,69 @@ namespace LLPerfStats
return positions.size();
}
const U32 NUM_PERIODS = 50;
void StatsRecorder::updateMeanFrameTime(U64 cur_frame_time_raw)
{
static std::deque<U64> frame_time_deque;
frame_time_deque.push_front(cur_frame_time_raw);
if (frame_time_deque.size() > NUM_PERIODS)
{
frame_time_deque.pop_back();
}
std::vector<U64> buf(frame_time_deque.begin(), frame_time_deque.end());
std::sort(buf.begin(), buf.end());
LLPerfStats::meanFrameTime = (buf.size() % 2 == 0) ? (buf[buf.size() / 2 - 1] + buf[buf.size() / 2]) / 2 : buf[buf.size() / 2];
}
U64 StatsRecorder::getMeanTotalFrameTime()
{
return LLPerfStats::meanFrameTime;
}
// static
void StatsRecorder::updateAvatarParams()
{
if(tunables.autoTuneTimeout)
{
LLPerfStats::lastSleepedFrame = gFrameCount;
tunables.autoTuneTimeout = false;
return;
}
// sleep time is basically forced sleep when window out of focus
auto tot_sleep_time_raw = LLPerfStats::StatsRecorder::getSceneStat(LLPerfStats::StatType_t::RENDER_SLEEP);
// similar to sleep time, induced by FPS limit
auto tot_limit_time_raw = LLPerfStats::StatsRecorder::getSceneStat(LLPerfStats::StatType_t::RENDER_FPSLIMIT);// <FS:Beq/> restore FPSLimit reporting
// the time spent this frame on the "doFrame" call. Treated as "tot time for frame"
auto tot_frame_time_raw = LLPerfStats::StatsRecorder::getSceneStat(LLPerfStats::StatType_t::RENDER_FRAME);
if( tot_sleep_time_raw != 0 )
{
// Note: we do not average sleep
// if at some point we need to, the averaging will need to take this into account or
// we forever think we're in the background due to residuals.
LL_DEBUGS() << "No tuning when not in focus" << LL_ENDL;
LLPerfStats::lastSleepedFrame = gFrameCount;
return;
}
U32 target_fps = tunables.vsyncEnabled ? std::min(LLPerfStats::vsync_max_fps, tunables.userTargetFPS) : tunables.userTargetFPS;
if(LLPerfStats::lastSleepedFrame != 0)
{
// wait a short time after viewer regains focus
if((gFrameCount - LLPerfStats::lastSleepedFrame) > target_fps * 5)
{
LLPerfStats::lastSleepedFrame = 0;
}
else
{
return;
}
}
updateMeanFrameTime(tot_frame_time_raw);
if(tunables.userImpostorDistanceTuningEnabled)
{
@ -329,37 +409,30 @@ namespace LLPerfStats
// Is our target frame time lower than current? If so we need to take action to reduce draw overheads.
// cumulative avatar time (includes idle processing, attachments and base av)
auto tot_avatar_time_raw = LLPerfStats::StatsRecorder::getSum(ObjType_t::OT_AVATAR, LLPerfStats::StatType_t::RENDER_COMBINED);
// sleep time is basically forced sleep when window out of focus
auto tot_sleep_time_raw = LLPerfStats::StatsRecorder::getSceneStat(LLPerfStats::StatType_t::RENDER_SLEEP);
// similar to sleep time, induced by FPS limit
auto tot_limit_time_raw = LLPerfStats::StatsRecorder::getSceneStat(LLPerfStats::StatType_t::RENDER_FPSLIMIT);// <FS:Beq/> restore FPSLimit reporting
// the time spent this frame on the "doFrame" call. Treated as "tot time for frame"
auto tot_frame_time_raw = LLPerfStats::StatsRecorder::getSceneStat(LLPerfStats::StatType_t::RENDER_FRAME);
if( tot_sleep_time_raw != 0 )
{
// Note: we do not average sleep
// if at some point we need to, the averaging will need to take this into account or
// we forever think we're in the background due to residuals.
LL_DEBUGS() << "No tuning when not in focus" << LL_ENDL;
return;
}
// The frametime budget we have based on the target FPS selected
auto target_frame_time_raw = (U64)llround(LLPerfStats::cpu_hertz/(tunables.userTargetFPS==0?1:tunables.userTargetFPS));
auto target_frame_time_raw = (U64)llround(LLPerfStats::cpu_hertz / (target_fps == 0 ? 1 : target_fps));
// LL_INFOS() << "Effective FPS(raw):" << tot_frame_time_raw << " Target:" << target_frame_time_raw << LL_ENDL;
auto inferredFPS{1000/(U32)std::max(raw_to_ms(tot_frame_time_raw),1.0)};
U32 settingsChangeFrequency{inferredFPS > 25?inferredFPS:25};
U32 settingsChangeFrequency{inferredFPS > 50?inferredFPS:50};
if( tot_limit_time_raw != 0)// <FS:Beq/> restore FPSLimit reporting
{
// This could be problematic.
tot_frame_time_raw -= tot_limit_time_raw;
}// <FS:Beq/> restore FPSLimit reporting
F64 time_buf = target_frame_time_raw * 0.1;
// 1) Is the target frame time lower than current?
if( target_frame_time_raw <= tot_frame_time_raw )
if ((target_frame_time_raw + time_buf) <= tot_frame_time_raw)
{
if (target_frame_time_raw - time_buf >= getMeanTotalFrameTime())
{
belowTargetFPS = false;
LLPerfStats::lastGlobalPrefChange = gFrameCount;
return;
}
if(belowTargetFPS == false)
{
// this is the first frame under. hold fire to add a little hysteresis
@ -440,7 +513,8 @@ namespace LLPerfStats
}
// LL_DEBUGS() << "AUTO_TUNE: Target frame time:"<< LLPerfStats::raw_to_us(target_frame_time_raw) << "usecs (non_avatar is " << LLPerfStats::raw_to_us(non_avatar_time_raw) << "usecs) Max cost limited=" << renderAvatarMaxART_ns << LL_ENDL;
}
else if( LLPerfStats::raw_to_ns(target_frame_time_raw) > (LLPerfStats::raw_to_ns(tot_frame_time_raw) + renderAvatarMaxART_ns) )
else if(( LLPerfStats::raw_to_ns(target_frame_time_raw) > (LLPerfStats::raw_to_ns(tot_frame_time_raw) + renderAvatarMaxART_ns) ) ||
(tunables.vsyncEnabled && (target_fps == LLPerfStats::vsync_max_fps) && (target_frame_time_raw > getMeanTotalFrameTime())))
{
if(belowTargetFPS == true)
{
@ -458,10 +532,11 @@ namespace LLPerfStats
// turn off if we are not locked.
tunables.updateUserAutoTuneEnabled(false);
}
if( LLPerfStats::tunedAvatars > 0 )
if(renderAvatarMaxART_ns != 0 && LLPerfStats::tunedAvatars > 0 )
{
// if we have more time to spare let's shift up little in the hope we'll restore an avatar.
renderAvatarMaxART_ns += LLPerfStats::ART_MIN_ADJUST_UP_NANOS;
U64 up_step = LLPerfStats::tunedAvatars > 2 ? LLPerfStats::ART_MIN_ADJUST_UP_NANOS : LLPerfStats::ART_MIN_ADJUST_UP_NANOS * 2;
renderAvatarMaxART_ns += up_step;
tunables.updateSettingsFromRenderCostLimit();
return;
}

View File

@ -67,7 +67,7 @@ namespace LLPerfStats
// Note if changing these, they should correspond with the log range of the correpsonding sliders
static constexpr U64 ART_UNLIMITED_NANOS{50000000};
static constexpr U64 ART_MINIMUM_NANOS{100000};
static constexpr U64 ART_MIN_ADJUST_UP_NANOS{10000};
static constexpr U64 ART_MIN_ADJUST_UP_NANOS{5000};
static constexpr U64 ART_MIN_ADJUST_DOWN_NANOS{10000};
static constexpr F32 PREFERRED_DD{180};
@ -84,6 +84,8 @@ namespace LLPerfStats
extern std::atomic<U64> renderAvatarMaxART_ns;
extern bool belowTargetFPS;
extern U32 lastGlobalPrefChange;
extern U32 lastSleepedFrame;
extern U64 meanFrameTime;
extern std::mutex bufferToggleLock;
enum class ObjType_t{
@ -156,6 +158,8 @@ namespace LLPerfStats
U32 userTargetFPS{0};
F32 userARTCutoffSliderValue{0};
S32 userTargetReflections{0};
bool autoTuneTimeout{true};
bool vsyncEnabled{true};
void updateNonImposters(U32 nv){nonImpostors=nv; tuningFlag |= NonImpostors;};
void updateReflectionDetail(S32 nv){reflectionDetail=nv; tuningFlag |= ReflectionDetail;};
@ -194,6 +198,7 @@ namespace LLPerfStats
}
static inline void setFocusAv(const LLUUID& avID){focusAv = avID;};
static inline const LLUUID& getFocusAv(){return focusAv;};
static inline void setAutotuneInit(){autotuneInit = true;};
// <FS:Beq> We do not want to use lock based queues
// static inline void send(StatsRecord && upd){StatsRecorder::getInstance().q.pushFront(std::move(upd));};
// static void endFrame(){StatsRecorder::getInstance().q.pushFront(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 0});};
@ -231,6 +236,8 @@ namespace LLPerfStats
StatsRecorder();
static int countNearbyAvatars(S32 distance);
static U64 getMeanTotalFrameTime();
static void updateMeanFrameTime(U64 tot_frame_time_raw);
// StatsArray is a uint64_t for each possible statistic type.
using StatsArray = std::array<uint64_t, static_cast<size_t>(LLPerfStats::StatType_t::STATS_COUNT)>;
using StatsMap = std::unordered_map<LLUUID, StatsArray, FSUUIDHash>; // <FS:Beq/>
@ -239,6 +246,7 @@ namespace LLPerfStats
static std::atomic<int> writeBuffer;
static LLUUID focusAv;
static bool autotuneInit;
static std::array<StatsTypeMatrix,2> statsDoubleBuffer;
static std::array<StatsSummaryArray,2> max;
static std::array<StatsSummaryArray,2> sum;

View File

@ -3090,7 +3090,9 @@ bool idle_startup()
// <FS:Ansariel> Disable this in favor of FS performance floater customization
//if (gAgent.isFirstLogin())
//{
// gSavedSettings.setBOOL("AutoFPS", TRUE);
// gSavedSettings.setBOOL("AutoTuneLock", TRUE);
// gSavedSettings.setBOOL("KeepAutoTuneLock", TRUE);
// gSavedSettings.setBOOL("AutoTuneFPS", TRUE);
//}
// </FS:Ansariel>
set_startup_status(1.0, "", "");
@ -3220,6 +3222,8 @@ bool idle_startup()
LLUIUsage::instance().clear();
LLPerfStats::StatsRecorder::setAutotuneInit();
// <FS:Techwolf Lupindo> FIRE-6643 Display MOTD when login screens are disabled
if (gSavedSettings.getBOOL("FSDisableLoginScreens"))
{

View File

@ -359,8 +359,15 @@ static bool handleAnisotropicChanged(const LLSD& newvalue)
static bool handleVSyncChanged(const LLSD& newvalue)
{
LLPerfStats::tunables.vsyncEnabled = newvalue.asBoolean();
gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean());
if(newvalue.asBoolean() == true)
{
U32 current_target = gSavedSettings.getU32("TargetFPS");
gSavedSettings.setU32("TargetFPS", std::min((U32)gViewerWindow->getWindow()->getRefreshRate(), current_target));
}
return true;
}
@ -1083,13 +1090,24 @@ void handleDiskCacheSizeChanged(const LLSD& newValue)
void handleTargetFPSChanged(const LLSD& newValue)
{
const auto targetFPS = gSavedSettings.getU32("TargetFPS");
LLPerfStats::tunables.userTargetFPS = targetFPS;
U32 frame_rate_limit = gViewerWindow->getWindow()->getRefreshRate();
if(LLPerfStats::tunables.vsyncEnabled && (targetFPS > frame_rate_limit))
{
gSavedSettings.setU32("TargetFPS", std::min(frame_rate_limit, targetFPS));
}
else
{
LLPerfStats::tunables.userTargetFPS = targetFPS;
}
}
void handleAutoTuneLockChanged(const LLSD& newValue)
{
const auto newval = gSavedSettings.getBOOL("AutoTuneLock");
LLPerfStats::tunables.userAutoTuneLock = newval;
gSavedSettings.setBOOL("AutoTuneFPS", newval);
}
void handleAutoTuneFPSChanged(const LLSD& newValue)

View File

@ -891,12 +891,16 @@ LLVOAvatar::~LLVOAvatar()
debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding");
}
// <FS:ND> only call logPendingPhases if we're still alive. Otherwise this can lead to shutdown crashes
if(mTuned)
{
LLPerfStats::tunedAvatars--;
mTuned = false;
}
// <FS:ND> only call logPendingPhases if we're still alive. Otherwise this can lead to shutdown crashes
// logPendingPhases();
if (isAgentAvatarValid())
logPendingPhases();
// </FS:ND>
LL_DEBUGS("Avatar") << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << LL_ENDL;
@ -9361,9 +9365,15 @@ void LLVOAvatar::updateTooSlow()
mTooSlow = false;
mTooSlowWithoutShadows = false;
}
if(mTooSlow)
if(mTooSlow && !mTuned)
{
LLPerfStats::tunedAvatars++; // increment the number of avatars that have been tweaked.
mTuned = true;
}
else if(!mTooSlow && mTuned)
{
LLPerfStats::tunedAvatars--;
mTuned = false;
}
// <FS:Beq> better state change flagging
if( changed_slow_state )

View File

@ -432,6 +432,8 @@ private:
bool mTooSlow{false};
bool mTooSlowWithoutShadows{false};
bool mTuned{false};
private:
LLViewerStats::PhaseMap mPhases;

View File

@ -11217,11 +11217,9 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar)
<< " is " << ( too_complex ? "" : "not ") << "too complex"
<< LL_ENDL;
bool too_slow = avatar->isTooSlowWithoutShadows();// <FS:Beq/> only if we really have to do we imposter.
pushRenderTypeMask();
if ( !too_slow && ( visually_muted || too_complex ) )
if (visually_muted || too_complex)
{
// only show jelly doll geometry
andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR,

View File

@ -3,5 +3,6 @@
<text name="Graphic Presets">
Grafikvoreinstellungen
</text>
<button label="Grafikeinstellungen öffnen" name="open_prefs_btn" tool_tip="Grafikeinstellungen anzeigen"/>
<button label="Grafikeinstellungen" name="open_prefs_btn" tool_tip="Grafikeinstellungen anzeigen"/>
<button label="Grafikeinstellungen" name="open_autofps_btn" tool_tip="Performance-Fenster anzeigen"/>
</panel>

View File

@ -57,13 +57,24 @@
width="215" />
<button
name="open_prefs_btn"
label="Open Graphics Preferences"
tool_tip = "Bring up graphics prefs"
label="Graphics Preferences"
tool_tip="Open graphics preferences"
top_delta="3"
left="15"
left="4"
height="22"
width="200">
width="132">
<button.commit_callback
function="Presets.GoGraphicsPrefs" />
</button>
<button
name="open_prefs_btn"
label="Performance"
tool_tip="Open performance window"
top_delta="0"
left_pad="5"
height="22"
width="80">
<button.commit_callback
function="Presets.GoAutofpsPrefs" />
</button>
</panel>