From c910fdda2bcd45a649592bb41cae7fbe8348fb38 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Tue, 18 Jun 2024 17:17:37 -0500 Subject: #1771 Fix for objects disappearing and not reappearing until LoD switch --- indra/newview/llvocache.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index bfac68b68f..a65e49a724 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -529,6 +529,16 @@ F32 LLVOCacheEntry::getSquaredPixelThreshold(bool is_front) bool LLVOCacheEntry::isAnyVisible(const LLVector4a& camera_origin, const LLVector4a& local_camera_origin, F32 dist_threshold) { +#if 0 + // this is ill-conceived and should be removed pending QA + // In the name of saving memory, we evict objects that are still within view distance from memory + // This results in constant paging of objects in and out of memory, leading to poor performance + // and many unacceptable visual glitches when rotating the camera + + // Honestly, the entire VOCache partition system needs to be removed since it doubles the overhead of + // the spatial partition system and is redundant to the object cache, but this is a start + // - davep 2024.06.07 + LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)getGroup(); if(!group) { @@ -565,6 +575,9 @@ bool LLVOCacheEntry::isAnyVisible(const LLVector4a& camera_origin, const LLVecto } return vis; +#else + return true; +#endif } void LLVOCacheEntry::calcSceneContribution(const LLVector4a& camera_origin, bool needs_update, U32 last_update, F32 max_dist) -- cgit v1.2.3 From 5c9d985b92ce059044cb15a0bdafa84dd3bd777f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 19 Jun 2024 13:36:44 +0300 Subject: triage#59 Properly hide particles if 'friends only' --- indra/newview/llvoavatar.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 035c02c804..b07d36832e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2587,7 +2587,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) return; } - LLCachedControl friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false); + static LLCachedControl friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false); if (friends_only() && !isUIAvatar() && !isControlAvatar() @@ -8473,17 +8473,29 @@ bool LLVOAvatar::isTooComplex() const bool LLVOAvatar::isTooSlow() const { + if (mIsControlAvatar) + { + return mTooSlow; + } + static LLCachedControl compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode"); - bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY); + static LLCachedControl friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false); + bool is_friend = LLAvatarTracker::instance().isBuddy(getID()); + bool render_friend = is_friend && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY; if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER) { return false; } - else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar) + else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS) + { + return true; + } + else if (!is_friend && friends_only()) { return true; } + return mTooSlow; } -- cgit v1.2.3 From 2515f422cfea1d2ad6947022636c1e3a70f4b282 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 20 Jun 2024 15:05:14 +0300 Subject: viewer-private#247 Retry loading missing textures for model upload in case user provided a texture later, after seeing a 'missing texture' error. --- indra/newview/llmeshrepository.h | 2 +- indra/newview/llmodelpreview.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index b9430a6165..b850ade0bb 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -533,7 +533,7 @@ public: // Inherited from LLCore::HttpHandler virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); - LLViewerFetchedTexture* FindViewerTexture(const LLImportMaterial& material); + static LLViewerFetchedTexture* FindViewerTexture(const LLImportMaterial& material); private: LLHandle mFeeObserverHandle; diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 7ecd7cdff9..b1a48db0ee 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -543,6 +543,32 @@ void LLModelPreview::rebuildUploadData() } instance.mTransform = mat; mUploadData.push_back(instance); + + // if uploading textures, make sure textures are present + if (mFMP->childGetValue("upload_textures").asBoolean()) // too early to cheack if still loading + { + for (auto& mat_pair : instance.mMaterial) + { + LLImportMaterial& material = mat_pair.second; + + if (material.mDiffuseMapFilename.size()) + { + LLViewerFetchedTexture* texture = LLMeshUploadThread::FindViewerTexture(material); + if (texture && texture->isMissingAsset()) + { + // in case user provided a missing file later + texture->setIsMissingAsset(false); + texture->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, true, false, this, NULL, false); + texture->forceToSaveRawImage(0, F32_MAX); + texture->updateFetch(); + if (mModelLoader) + { + mModelLoader->mNumOfFetchingTextures++; + } + } + } + } + } } } -- cgit v1.2.3