summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2023-03-01 09:51:08 -0800
committerBrad Linden <brad@lindenlab.com>2023-03-13 10:27:22 -0700
commit804c207dcc07b9ae39922a3475de7e9a513f3e16 (patch)
tree0efec73a95760f887f691e8a6e36edf6a0e86b78 /indra/newview/llviewerregion.cpp
parente5d80b600012ab4250eb226af150fbec5e485ee3 (diff)
Partial solution for SL-18458 Materials override cache not working and related SL-18684/SL-19206/SL-19173
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index e3ac1767fb..afe48f01b5 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -785,7 +785,7 @@ void LLViewerRegion::loadObjectCache()
if(LLVOCache::instanceExists())
{
LLVOCache & vocache = LLVOCache::instance();
- vocache.readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap) ;
+ vocache.readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap);
vocache.readGenericExtrasFromCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesJson);
if (mImpl->mCacheMap.empty())
@@ -814,7 +814,8 @@ void LLViewerRegion::saveObjectCache()
bool removal_enabled = sVOCacheCullingEnabled && (mRegionTimer.getElapsedTimeF32() > start_time_threshold); //allow to remove invalid objects from object cache file.
LLVOCache & instance = LLVOCache::instance();
- instance.writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled) ;
+
+ instance.writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled);
instance.writeGenericExtrasToCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesJson, mCacheDirty, removal_enabled);
mCacheDirty = FALSE;
}
@@ -822,6 +823,7 @@ void LLViewerRegion::saveObjectCache()
// Map of LLVOCacheEntry takes time to release, store map for cleanup on idle
sRegionCacheCleanup.insert(mImpl->mCacheMap.begin(), mImpl->mCacheMap.end());
mImpl->mCacheMap.clear();
+ // TODO - probably need to do the same for overrides cache
}
void LLViewerRegion::sendMessage()
@@ -2646,6 +2648,8 @@ void LLViewerRegion::cacheFullUpdateGLTFOverride(const LLGLTFOverrideCacheEntry
LLViewerObject * obj = gObjectList.findObject(object_id);
if (obj != nullptr)
{
+ llassert(obj->getRegion() == this);
+
U32 local_id = obj->getLocalID();
mImpl->mGLTFOverridesJson[local_id] = override_data;
@@ -3547,4 +3551,8 @@ void LLViewerRegion::loadCacheMiscExtras(U32 local_id, LLVOCacheEntry * entry, U
{
LLGLTFMaterialList::loadCacheOverrides(iter->second);
}
+ else
+ {
+ LL_DEBUGS("GLTF") << "cache miss for handle: " << mHandle << " local_id:" << local_id << LL_ENDL;
+ }
}