From 12481f4f8f8ca1a4783353527f4eb6b87e1709e1 Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 4 Dec 2018 02:33:42 +0000 Subject: [PATCH] FIRE-23331 - SkinningMatrixCaching has side-effects during appearance editing --- indra/newview/app_settings/settings.xml | 13 ++++++++++++- indra/newview/lldrawpoolavatar.cpp | 5 +++-- indra/newview/llvoavatarself.cpp | 3 ++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6a8eb0bead..cbca5e04a2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6551,7 +6551,7 @@ FSEnableAggressiveComplexityUpdates Comment - Enable avctive complexity calculations. This may have a significant detrimental performance impact if enabled. + Enable active complexity calculations. This may have a significant detrimental performance impact if enabled. Persist 1 Type @@ -6559,6 +6559,17 @@ Value 0 + FSDisableRiggedMeshMatrixCaching + + Comment + Disable the caching of Rigged mesh matrix pallettes.Non-persistant. + Persist + 0 + Type + Boolean + Value + 0 + FullScreenAspectRatio Comment diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index c98f08b839..3136b91b34 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1921,8 +1921,9 @@ LLMatrix4a* LLDrawPoolAvatar::getCacheSkinningMats(LLDrawable* drawable, const L // drawable->mSkinningMatCache = new LLMatrix4a[count]; drawable->mSkinningMatCache = (LLMatrix4a*)ll_aligned_malloc_16(sizeof(LLMatrix4a)*count); } - - if (drawable->mSkinningMatCache && LLFrameTimer::getFrameCount() != drawable->mLastSkinningMatCacheFrame) + + static LLCachedControl disableMatCache(gSavedSettings, "FSDisableRiggedMeshMatrixCaching"); // FIRE-23331 - disable matrix caching during appearance update due to weird side effects + if (disableMatCache || (drawable->mSkinningMatCache && LLFrameTimer::getFrameCount() != drawable->mLastSkinningMatCacheFrame)) { // LL_DEBUGS("Skinning") << "Call InitSkinningMatrixPalette for drawable @" << (U64)drawable << LL_ENDL; // add caching of matrix pallette as high up the stack as we can diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index fc1980bbd6..9d1b93d105 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -3211,7 +3211,7 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch) gAgentAvatarp->mIsEditingAppearance = true; gAgentAvatarp->mUseLocalAppearance = true; - + gSavedSettings.setBOOL("FSDisableRiggedMeshMatrixCaching", true); // FIRE-23331 - disable matrix caching during appearance update due to weird side effects if (gSavedSettings.getBOOL("AppearanceCameraMovement") && !disable_camera_switch) { gAgentCamera.changeCameraToCustomizeAvatar(); @@ -3235,6 +3235,7 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch) if (isAgentAvatarValid()) { gAgentAvatarp->mIsEditingAppearance = false; + gSavedSettings.setBOOL("FSDisableRiggedMeshMatrixCaching", false); // FIRE-23331 - disable matrix caching during appearance update due to weird side effects // [Legacy Bake] if (gAgentAvatarp->getRegion() && !gAgentAvatarp->getRegion()->getCentralBakeVersion()) {