From 72ce0248f1669e3e172e38beeab96147d7eaea3b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 24 Oct 2024 20:45:29 +0300 Subject: [PATCH 1/3] viewer#2753 "Animation to play" drop-down box stuck at None Restore selection after regenerating list --- indra/newview/llpreviewgesture.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); From fa5aba2b67a029c7415c48270c8c84cd35e73a24 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sun, 20 Oct 2024 23:20:58 +0300 Subject: [PATCH 2/3] viewer#2875 Proportionally agressive vram cleanup --- indra/newview/llviewertexture.cpp | 10 +++++++--- indra/newview/llviewertexturelist.cpp | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0f9c65893d..f1c0a4f0fc 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -505,8 +505,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 +526,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) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 08e9151940..0d609b8084 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1169,6 +1169,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 From 05858ee68bc9bc3fd04c5f593c37f21b1c68a7ac Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 25 Oct 2024 00:10:35 +0300 Subject: [PATCH 3/3] viewer#2653 Failure logging --- indra/newview/llpreviewtexture.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 )