From b4b52e471739e5aa8ba03985b124ae5da2bdedd7 Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:04:44 -0700 Subject: Add early-out in LLPipeline::applyCAS() if gCASProgram failed to compile. (#2760) fix secondlife/viewer#2756 --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 39652ff6af..3e66ed1ab2 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7288,7 +7288,7 @@ void LLPipeline::generateGlow(LLRenderTarget* src) void LLPipeline::applyCAS(LLRenderTarget* src, LLRenderTarget* dst) { static LLCachedControl cas_sharpness(gSavedSettings, "RenderCASSharpness", 0.4f); - if (cas_sharpness == 0.0f) + if (cas_sharpness == 0.0f || !gCASProgram.isComplete()) { gPipeline.copyRenderTarget(src, dst); return; -- cgit v1.2.3 From 74fe406916a21b0ac7cecaff9549ea5e374176c8 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Tue, 1 Oct 2024 19:01:36 -0400 Subject: Fix thread-unsafe usage of LLPointer and LLMeshSkinInfo(#2755) (#2759) --- indra/newview/llmeshrepository.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 1f214344ff..a5bed1dbe6 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -864,7 +864,7 @@ LLMeshRepoThread::~LLMeshRepoThread() while (!mSkinInfoQ.empty()) { - delete mSkinInfoQ.front(); + llassert(mSkinInfoQ.front()->getNumRefs() == 1); mSkinInfoQ.pop_front(); } @@ -2058,13 +2058,15 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat LLSkinningUtil::initJointNums(info, gAgentAvatarp); } - // remember the skin info in the background thread so we can use it + // copy the skin info for the background thread so we can use it // to calculate per-joint bounding boxes when volumes are loaded - mSkinMap[mesh_id] = info; + mSkinMap[mesh_id] = new LLMeshSkinInfo(*info); { + // Move the LLPointer in to the skin info queue to avoid reference + // count modification after we leave the lock LLMutexLock lock(mMutex); - mSkinInfoQ.push_back(info); + mSkinInfoQ.emplace_back(std::move(info)); } } -- cgit v1.2.3