From 005b29b89f7a3cbe54d37b53c0061ee36c80d871 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 11 Jan 2023 19:34:04 +0200 Subject: SL-18933 FIXED Maximum render time cycles if the Desired framerate is much lower than current framerate --- indra/newview/llperfstats.cpp | 2 +- indra/newview/llperfstats.h | 2 +- indra/newview/llvoavatar.cpp | 14 +++++++++++++- indra/newview/llvoavatar.h | 2 ++ 4 files changed, 17 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llperfstats.cpp b/indra/newview/llperfstats.cpp index 3bf88bb2a6..f3d433a622 100644 --- a/indra/newview/llperfstats.cpp +++ b/indra/newview/llperfstats.cpp @@ -446,7 +446,7 @@ 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; diff --git a/indra/newview/llperfstats.h b/indra/newview/llperfstats.h index ac44afe5db..7aa3e1491c 100644 --- a/indra/newview/llperfstats.h +++ b/indra/newview/llperfstats.h @@ -45,7 +45,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{20000}; static constexpr U64 ART_MIN_ADJUST_DOWN_NANOS{10000}; static constexpr F32 PREFERRED_DD{180}; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9c74323f99..dbfd47d2fa 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -816,6 +816,12 @@ LLVOAvatar::~LLVOAvatar() debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding"); } + if(mTuned) + { + LLPerfStats::tunedAvatars--; + mTuned = false; + } + logPendingPhases(); LL_DEBUGS("Avatar") << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << LL_ENDL; @@ -8382,9 +8388,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; } } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index bdc3d98e21..e07ead9d46 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -410,6 +410,8 @@ private: bool mTooSlow{false}; bool mTooSlowWithoutShadows{false}; + bool mTuned{false}; + private: LLViewerStats::PhaseMap mPhases; -- cgit v1.2.3