summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-10-31 11:42:18 -0700
committerBrad Linden <brad@lindenlab.com>2024-10-31 11:42:18 -0700
commit5fbbfb64020cf172a127841fd931024e7bdf0da1 (patch)
tree1dae52ef6f55508cbff90d7d2e8f297a4cc8c9e1
parent34e909b6bfbd99d3df481a2f6e566a0b58a15905 (diff)
parent8dfc1d0447bae8afd1567abf85ecbec9b43790a0 (diff)
Merge remote-tracking branch 'origin/release/2024.09-ExtraFPS' into develop
# Conflicts: # indra/newview/featuretable_linux.txt
-rw-r--r--indra/llrender/llfontvertexbuffer.cpp4
-rw-r--r--indra/llrender/llfontvertexbuffer.h2
-rw-r--r--indra/llxml/llxmlnode.cpp23
-rw-r--r--indra/llxml/llxmlnode.h1
-rw-r--r--indra/newview/app_settings/settings.xml24
-rw-r--r--indra/newview/featuretable.txt27
-rw-r--r--indra/newview/featuretable_linux.txt27
-rw-r--r--indra/newview/featuretable_mac.txt26
-rw-r--r--indra/newview/llpreviewgesture.cpp5
-rw-r--r--indra/newview/llpreviewtexture.cpp10
-rw-r--r--indra/newview/llviewerdisplay.cpp29
-rw-r--r--indra/newview/llviewertexture.cpp59
-rw-r--r--indra/newview/llviewertexturelist.cpp5
-rw-r--r--indra/newview/llxmlrpctransaction.cpp3
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml30
16 files changed, 258 insertions, 19 deletions
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 963aab7121..5bd1ca5eed 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -144,6 +144,8 @@ S32 LLFontVertexBuffer::render(
|| mLastShadow != shadow // ex: buttons change shadow state
|| mLastScaleX != LLFontGL::sScaleX
|| mLastScaleY != LLFontGL::sScaleY
+ || mLastVertDPI != LLFontGL::sVertDPI
+ || mLastHorizDPI != LLFontGL::sHorizDPI
|| mLastOrigin != LLFontGL::sCurOrigin)
{
genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
@@ -196,6 +198,8 @@ void LLFontVertexBuffer::genBuffers(
mLastScaleX = LLFontGL::sScaleX;
mLastScaleY = LLFontGL::sScaleY;
+ mLastVertDPI = LLFontGL::sVertDPI;
+ mLastHorizDPI = LLFontGL::sHorizDPI;
mLastOrigin = LLFontGL::sCurOrigin;
if (right_x)
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
index 59cb536b74..af195dfff9 100644
--- a/indra/llrender/llfontvertexbuffer.h
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -115,6 +115,8 @@ private:
// LLFontGL's statics
F32 mLastScaleX = 1.f;
F32 mLastScaleY = 1.f;
+ F32 mLastVertDPI = 0.f;
+ F32 mLastHorizDPI = 0.f;
LLCoordGL mLastOrigin;
static bool sEnableBufferCollection;
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index e695035461..92bcb1a2ae 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -3256,6 +3256,27 @@ std::string LLXMLNode::getTextContents() const
return msg;
}
+std::string LLXMLNode::getXMLRPCTextContents() const
+{
+ std::string msg;
+ std::string::size_type start = mValue.find_first_not_of(" \t\n");
+ if (start != mValue.npos)
+ {
+ std::string::size_type end = mValue.find_last_not_of(" \t\n");
+ if (end != mValue.npos)
+ {
+ msg = mValue.substr(start, end + 1 - start);
+ }
+ else
+ {
+ msg = mValue.substr(start);
+ }
+ }
+ // Convert any internal CR to LF
+ msg = utf8str_removeCRLF(msg);
+ return msg;
+}
+
void LLXMLNode::setLineNumber(S32 line_number)
{
mLineNumber = line_number;
@@ -3365,7 +3386,7 @@ bool LLXMLNode::fromXMLRPCValue(LLSD& target)
if (childp->hasName("string"))
{
- target.assign(LLStringFn::xml_decode(childp->getTextContents()));
+ target.assign(LLStringFn::xml_decode(childp->getXMLRPCTextContents()));
return true;
}
diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h
index 3769ec8293..09c7c4fdad 100644
--- a/indra/llxml/llxmlnode.h
+++ b/indra/llxml/llxmlnode.h
@@ -295,6 +295,7 @@ protected:
bool removeChild(LLXMLNode* child);
bool isFullyDefault();
+ std::string getXMLRPCTextContents() const;
bool parseXmlRpcArrayValue(LLSD& target);
bool parseXmlRpcStructValue(LLSD& target);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 7a29401bb6..049ec3ad34 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9289,7 +9289,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>1.5</real>
+ <real>1.0</real>
</map>
<key>RenderReflectionProbeDrawDistance</key>
@@ -11771,6 +11771,28 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>TextureDiscardBackgroundedTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Specify how long to wait before discarding texture data after viewer is backgrounded. (zero or negative to disable)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>60.0</real>
+ </map>
+ <key>TextureDiscardMinimizedTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Specify how long to wait before discarding texture data after viewer is minimized. (zero or negative to disable)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>1.0</real>
+ </map>
<key>TextureFetchConcurrency</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 553d6c1d32..6390e43b7a 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 63
+version 64
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -81,7 +81,9 @@ RenderHeroProbeUpdateRate 1 6
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderDownScaleMethod 1 1
RenderCASSharpness 1 1
-
+RenderExposure 1 4
+RenderTonemapType 1 1
+RenderTonemapMix 1 1
//
// Low Graphics Settings
@@ -119,6 +121,9 @@ RenderHeroProbeDistance 1 4
RenderHeroProbeUpdateRate 1 6
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium Low Graphics Settings
@@ -156,6 +161,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 3
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium Graphics Settings (standard)
@@ -193,6 +201,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 3
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium High Graphics Settings
@@ -230,6 +241,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 2
RenderHeroProbeConservativeUpdateMultiplier 1 8
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// High Graphics Settings (SSAO + sun shadows)
@@ -267,6 +281,9 @@ RenderHeroProbeDistance 1 8
RenderHeroProbeUpdateRate 1 2
RenderHeroProbeConservativeUpdateMultiplier 1 8
RenderCASSharpness 1 0.4
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// High Ultra Graphics Settings (deferred + SSAO + all shadows)
@@ -304,6 +321,9 @@ RenderHeroProbeDistance 1 16
RenderHeroProbeUpdateRate 1 1
RenderHeroProbeConservativeUpdateMultiplier 1 4
RenderCASSharpness 1 0.4
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Ultra graphics (REALLY PURTY!)
@@ -341,6 +361,9 @@ RenderHeroProbeDistance 1 16
RenderHeroProbeUpdateRate 1 1
RenderHeroProbeConservativeUpdateMultiplier 1 4
RenderCASSharpness 1 0.4
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index dc5d1ff6c4..9465acae6b 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -1,4 +1,4 @@
-version 29
+version 30
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -81,7 +81,9 @@ RenderHeroProbeUpdateRate 1 4
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderDownScaleMethod 1 1
RenderCASSharpness 1 1
-
+RenderExposure 1 4
+RenderTonemapType 1 1
+RenderTonemapMix 1 1
//
// Low Graphics Settings
@@ -119,6 +121,9 @@ RenderHeroProbeDistance 1 4
RenderHeroProbeUpdateRate 1 6
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium Low Graphics Settings
@@ -156,6 +161,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 3
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium Graphics Settings (standard)
@@ -193,6 +201,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 3
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium High Graphics Settings
@@ -230,6 +241,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 2
RenderHeroProbeConservativeUpdateMultiplier 1 8
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// High Graphics Settings (SSAO + sun shadows)
@@ -267,6 +281,9 @@ RenderHeroProbeDistance 1 8
RenderHeroProbeUpdateRate 1 2
RenderHeroProbeConservativeUpdateMultiplier 1 8
RenderCASSharpness 1 0.4
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// High Ultra Graphics Settings (deferred + SSAO + all shadows)
@@ -304,6 +321,9 @@ RenderHeroProbeDistance 1 16
RenderHeroProbeUpdateRate 1 1
RenderHeroProbeConservativeUpdateMultiplier 1 4
RenderCASSharpness 1 0.4
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Ultra graphics (REALLY PURTY!)
@@ -341,6 +361,9 @@ RenderHeroProbeDistance 1 16
RenderHeroProbeUpdateRate 1 1
RenderHeroProbeConservativeUpdateMultiplier 1 4
RenderCASSharpness 1 0.4
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index b1359f8b91..9ba922c3ce 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 61
+version 62
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -80,6 +80,9 @@ RenderHeroProbeDistance 1 16
RenderHeroProbeUpdateRate 1 6
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 1
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 1
//
// Low Graphics Settings
@@ -117,6 +120,9 @@ RenderHeroProbeDistance 1 4
RenderHeroProbeUpdateRate 1 6
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium Low Graphics Settings
@@ -154,6 +160,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 3
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium Graphics Settings (standard)
@@ -191,6 +200,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 3
RenderHeroProbeConservativeUpdateMultiplier 1 16
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Medium High Graphics Settings
@@ -228,6 +240,9 @@ RenderHeroProbeDistance 1 6
RenderHeroProbeUpdateRate 1 2
RenderHeroProbeConservativeUpdateMultiplier 1 8
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// High Graphics Settings (SSAO + sun shadows)
@@ -265,6 +280,9 @@ RenderHeroProbeDistance 1 8
RenderHeroProbeUpdateRate 1 2
RenderHeroProbeConservativeUpdateMultiplier 1 8
RenderCASSharpness 1 0
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// High Ultra Graphics Settings (SSAO + all shadows)
@@ -302,6 +320,9 @@ RenderHeroProbeDistance 1 16
RenderHeroProbeUpdateRate 1 1
RenderHeroProbeConservativeUpdateMultiplier 1 4
RenderCASSharpness 1 0.4
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Ultra graphics (REALLY PURTY!)
@@ -339,6 +360,9 @@ RenderHeroProbeDistance 1 16
RenderHeroProbeUpdateRate 1 1
RenderHeroProbeConservativeUpdateMultiplier 1 4
RenderCASSharpness 1 0.4
+RenderExposure 1 1
+RenderTonemapType 1 1
+RenderTonemapMix 1 0.7
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 7cbbb89313..66dcd2f7ba 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -517,6 +517,7 @@ void LLPreviewGesture::addKeys()
void LLPreviewGesture::addAnimations()
{
LLComboBox* combo = mAnimationCombo;
+ LLUUID old_value = combo->getCurrentID();
combo->removeall();
@@ -565,6 +566,8 @@ void LLPreviewGesture::addAnimations()
combo->add(item->getName(), item->getAssetUUID(), ADD_BOTTOM);
}
+
+ combo->setCurrentByID(old_value);
}
@@ -1410,7 +1413,7 @@ void LLPreviewGesture::onCommitAnimation(LLUICtrl* ctrl, void* data)
{
// Assign the animation name
LLGestureStepAnimation* anim_step = (LLGestureStepAnimation*)step;
- if (self->mAnimationCombo->getCurrentIndex() == 0)
+ if (self->mAnimationCombo->getCurrentIndex() <= 0)
{
anim_step->mAnimName.clear();
anim_step->mAnimAssetID.setNull();
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 1b657d9ea1..800fc7ec0c 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -441,6 +441,16 @@ void LLPreviewTexture::onFileLoadedForSave(bool success,
self->getWindow()->decBusyCount();
self->mLoadingFullImage = false;
}
+ if (!success)
+ {
+ LL_WARNS("FileSaveAs") << "Failed to download file " << *item_uuid << " for saving."
+ << " Is missing: " << (src_vi->isMissingAsset() ? "true" : "false")
+ << " Discard: " << src_vi->getDiscardLevel()
+ << " Raw discard: " << discard_level
+ << " Size: " << src_vi->getWidth() << "x" << src_vi->getHeight()
+ << " Has GL texture: " << (src_vi->hasGLTexture() ? "true" : "false")
+ << " Has saved raw image: " << (src_vi->hasSavedRawImage() ? "true" : "false") << LL_ENDL;
+ }
}
if( self && final && success )
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index cb741e4af9..b0e07d8ea3 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -473,6 +473,35 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
// true = minimized, do not show/update the TP screen. HB
update_tp_display(true);
}
+
+ // Run texture subsystem to discard memory while backgrounded
+ if (!gNonInteractive)
+ {
+ LL_PROFILE_ZONE_NAMED("Update Images");
+
+ {
+ LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Class");
+ LLViewerTexture::updateClass();
+ }
+
+ {
+ LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Image Update Bump");
+ gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
+ }
+
+ {
+ LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("List");
+ F32 max_image_decode_time = 0.050f * gFrameIntervalSeconds.value(); // 50 ms/second decode time
+ max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f); // min 2ms/frame, max 5ms/frame)
+ gTextureList.updateImages(max_image_decode_time);
+ }
+
+ {
+ LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("GLTF Materials Cleanup");
+ // remove dead gltf materials
+ gGLTFMaterialList.flushMaterials();
+ }
+ }
return;
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 0f9c65893d..82fefde0a7 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -43,6 +43,7 @@
#include "message.h"
#include "lltimer.h"
#include "v4coloru.h"
+#include "llnotificationsutil.h"
// viewer includes
#include "llimagegl.h"
@@ -505,8 +506,12 @@ void LLViewerTexture::updateClass()
F32 budget = max_vram_budget == 0 ? (F32)gGLManager.mVRAM : (F32)max_vram_budget;
- // try to leave half a GB for everyone else, but keep at least 768MB for ourselves
- F32 target = llmax(budget - 512.f, MIN_VRAM_BUDGET);
+ // Try to leave at least half a GB for everyone else and for bias,
+ // but keep at least 768MB for ourselves
+ // Viewer can 'overshoot' target when scene changes, if viewer goes over budget it
+ // can negatively impact performance, so leave 20% of a breathing room for
+ // 'bias' calculation to kick in.
+ F32 target = llmax(llmin(budget - 512.f, budget * 0.8f), MIN_VRAM_BUDGET);
sFreeVRAMMegabytes = target - used;
F32 over_pct = (used - target) / target;
@@ -522,7 +527,7 @@ void LLViewerTexture::updateClass()
// slam to 1.5 bias the moment we hit low memory (discards off screen textures immediately)
sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f);
- if (is_sys_low)
+ if (is_sys_low || over_pct > 2.f)
{ // if we're low on system memory, emergency purge off screen textures to avoid a death spiral
LL_WARNS() << "Low system memory detected, emergency downrezzing off screen textures" << LL_ENDL;
for (auto& image : gTextureList)
@@ -542,7 +547,6 @@ void LLViewerTexture::updateClass()
{
static LLCachedControl<F32> low_mem_min_discard_increment(gSavedSettings, "RenderLowMemMinDiscardIncrement", .1f);
sDesiredDiscardBias += (F32) low_mem_min_discard_increment * (F32) gFrameIntervalSeconds;
- sEvaluationTimer.reset();
}
}
else
@@ -558,20 +562,49 @@ void LLViewerTexture::updateClass()
}
// set to max discard bias if the window has been backgrounded for a while
+ static F32 last_desired_discard_bias = 1.f;
static bool was_backgrounded = false;
static LLFrameTimer backgrounded_timer;
+ static LLCachedControl<F32> minimized_discard_time(gSavedSettings, "TextureDiscardMinimizedTime", 1.f);
+ static LLCachedControl<F32> backgrounded_discard_time(gSavedSettings, "TextureDiscardBackgroundedTime", 60.f);
bool in_background = (gViewerWindow && !gViewerWindow->getWindow()->getVisible()) || !gFocusMgr.getAppHasFocus();
-
+ bool is_minimized = gViewerWindow && gViewerWindow->getWindow()->getMinimized() && in_background;
if (in_background)
{
- if (backgrounded_timer.getElapsedTimeF32() > 10.f)
+ F32 discard_time = is_minimized ? minimized_discard_time : backgrounded_discard_time;
+ if (discard_time > 0.f && backgrounded_timer.getElapsedTimeF32() > discard_time)
{
if (!was_backgrounded)
{
- LL_INFOS() << "Viewer is backgrounded, freeing up video memory." << LL_ENDL;
+ std::string notification_name;
+ std::string setting;
+ if (is_minimized)
+ {
+ notification_name = "TextureDiscardMinimized";
+ setting = "TextureDiscardMinimizedTime";
+ }
+ else
+ {
+ notification_name = "TextureDiscardBackgrounded";
+ setting = "TextureDiscardBackgroundedTime";
+ }
+
+ LL_INFOS() << "Viewer was " << (is_minimized ? "minimized" : "backgrounded") << " for " << discard_time
+ << "s, freeing up video memory." << LL_ENDL;
+
+ LLNotificationsUtil::add(notification_name, llsd::map("DELAY", discard_time), LLSD(),
+ [=](const LLSD& notification, const LLSD& response)
+ {
+ if (response["Cancel_okcancelignore"].asBoolean())
+ {
+ LL_INFOS() << "User chose to disable texture discard on " << (is_minimized ? "minimizing." : "backgrounding.") << LL_ENDL;
+ gSavedSettings.setF32(setting, -1.f);
+ }
+ });
+ last_desired_discard_bias = sDesiredDiscardBias;
+ was_backgrounded = true;
}
- was_backgrounded = true;
sDesiredDiscardBias = 4.f;
}
}
@@ -580,9 +613,9 @@ void LLViewerTexture::updateClass()
backgrounded_timer.reset();
if (was_backgrounded)
{ // if the viewer was backgrounded
- LL_INFOS() << "Viewer is no longer backgrounded, resuming normal texture usage." << LL_ENDL;
+ LL_INFOS() << "Viewer is no longer backgrounded or minimized, resuming normal texture usage." << LL_ENDL;
was_backgrounded = false;
- sDesiredDiscardBias = 1.f;
+ sDesiredDiscardBias = last_desired_discard_bias;
}
}
@@ -1658,6 +1691,7 @@ void LLViewerFetchedTexture::processTextureStats()
if(mDesiredDiscardLevel > mMinDesiredDiscardLevel)//need to load more
{
mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel);
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S32)mLoadedCallbackDesiredDiscardLevel);
mFullyLoaded = false;
}
//setDebugText("fully loaded");
@@ -1707,6 +1741,7 @@ void LLViewerFetchedTexture::processTextureStats()
log((F32)mFullHeight / mKnownDrawHeight) / log_2);
mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel());
mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel);
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S32)mLoadedCallbackDesiredDiscardLevel);
}
mKnownDrawSizeChanged = false;
@@ -2431,6 +2466,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
if (mIsRawImageValid)
{
// If we have an existing raw image, we have a baseline for the raw and auxiliary quality levels.
+ current_raw_discard = mRawDiscardLevel;
best_raw_discard = llmin(best_raw_discard, mRawDiscardLevel);
best_aux_discard = llmin(best_aux_discard, mRawDiscardLevel); // We always decode the aux when we decode the base raw
current_aux_discard = llmin(current_aux_discard, best_aux_discard);
@@ -2889,10 +2925,12 @@ void LLViewerLODTexture::processTextureStats()
{
// If the image has not been significantly visible in a while, we don't want it
mDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel, (S8)(MAX_DISCARD_LEVEL + 1));
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S32)mLoadedCallbackDesiredDiscardLevel);
}
else if (!mFullWidth || !mFullHeight)
{
mDesiredDiscardLevel = getMaxDiscardLevel();
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S32)mLoadedCallbackDesiredDiscardLevel);
}
else
{
@@ -2962,6 +3000,7 @@ void LLViewerLODTexture::processTextureStats()
// stop requesting more
mDesiredDiscardLevel = current_discard;
}
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S32)mLoadedCallbackDesiredDiscardLevel);
}
if(mForceToSaveRawImage && mDesiredSavedRawDiscardLevel >= 0)
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 752cfb3884..57bc19dadd 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1269,6 +1269,11 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
//update MIN_UPDATE_COUNT or 5% of other textures, whichever is greater
update_count = llmax((U32) MIN_UPDATE_COUNT, (U32) mUUIDMap.size()/20);
+ if (LLViewerTexture::sDesiredDiscardBias > 1.f)
+ {
+ // we are over memory target, update more agresively
+ update_count = (S32)(update_count * LLViewerTexture::sDesiredDiscardBias);
+ }
update_count = llmin(update_count, (U32) mUUIDMap.size());
{ // copy entries out of UUID map to avoid iterator invalidation from deletion inside updateImageDecodeProiroty or updateFetch below
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 0f956d8350..5b24d46bb0 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -313,6 +313,8 @@ bool LLXMLRPCTransaction::Impl::process()
if (mHasResponse && !mResponseParsed)
{
LLXMLNodePtr root;
+ bool strip_escaped_strings = LLXMLNode::sStripEscapedStrings;
+ LLXMLNode::sStripEscapedStrings = false;
if (!LLXMLNode::parseBuffer(mResponseText.data(), mResponseText.size(),
root, nullptr))
{
@@ -329,6 +331,7 @@ bool LLXMLRPCTransaction::Impl::process()
LL_WARNS() << "XMLRPC response parsing failed; request URI: "
<< mURI << LL_ENDL;
}
+ LLXMLNode::sStripEscapedStrings = strip_escaped_strings;
mResponseParsed = true;
}
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index 73ea0f548e..e81ff7f343 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -821,7 +821,7 @@
layout="topleft"
left="420"
min_val="0.5"
- max_val="1.5"
+ max_val="4.0"
name="RenderExposure"
show_text="true"
top_delta="24"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 4d74261a9a..cbc0f7ceae 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -12603,4 +12603,34 @@ are wearing now.
yestext="OK"/>
</notification>
+ <notification
+ icon="notify.tga"
+ name="TextureDiscardBackgrounded"
+ type="notify">
+ <unique>
+ <context>DELAY</context>
+ </unique>
+ To improve system performance, [SECOND_LIFE] has reduced texture memory usage after being in the background for [DELAY] seconds. It may take some time for texture image quality to return to normal.
+ <usetemplate
+ ignoretext="Ask me about background texture memory usage and recovery"
+ name="okcancelignore"
+ yestext="OK"
+ notext="Disable"/>
+ </notification>
+
+ <notification
+ icon="notify.tga"
+ name="TextureDiscardMinimized"
+ type="notify">
+ <unique>
+ <context>DELAY</context>
+ </unique>
+ To improve system performance, [SECOND_LIFE] has reduced texture memory usage after being minimized for [DELAY] seconds. It may take some time for texture image quality to return to normal.
+ <usetemplate
+ ignoretext="Ask me about minimized texture memory usage and recovery"
+ name="okcancelignore"
+ yestext="OK"
+ notext="Disable"/>
+ </notification>
+
</notifications>