summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-01-11 19:34:04 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-01-11 20:46:28 +0200
commit005b29b89f7a3cbe54d37b53c0061ee36c80d871 (patch)
treefcd293aeec127abfe43399605d91d44848c586ec
parent020bfa66ba9f1fee3e403595a1d6c95332bb16f7 (diff)
SL-18933 FIXED Maximum render time cycles if the Desired framerate is much lower than current framerate
-rw-r--r--indra/newview/llperfstats.cpp2
-rw-r--r--indra/newview/llperfstats.h2
-rw-r--r--indra/newview/llvoavatar.cpp14
-rw-r--r--indra/newview/llvoavatar.h2
4 files changed, 17 insertions, 3 deletions
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;