From c0ba626c8009b22310b3923e8170e5db2a021253 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 15 Oct 2012 21:34:29 -0600 Subject: For SH-3333: Design and implement a new object cache system on viewer side --- indra/newview/llviewerregion.h | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index c9fffaf30e..17654a8bc7 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -66,7 +66,8 @@ class LLDataPacker; class LLDataPackerBinaryBuffer; class LLHost; class LLBBox; - +class LLSpatialGroup; +class LLDrawable; class LLViewerRegionImpl; class LLViewerRegion: public LLCapabilityProvider // implements this interface @@ -85,6 +86,7 @@ public: PARTITION_VOLUME, PARTITION_BRIDGE, PARTITION_HUD_PARTICLE, + PARTITION_VO_CACHE, PARTITION_NONE, NUM_PARTITIONS } eObjectPartitions; @@ -216,6 +218,12 @@ public: F32 getWidth() const { return mWidth; } BOOL idleUpdate(F32 max_update_time); + void addVisibleGroup(LLSpatialGroup* group); + void addVisibleCacheEntry(LLVOCacheEntry* entry); + void addActiveCacheEntry(LLVOCacheEntry* entry); + void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); + void killCacheEntry(U32 local_id); //physically delete the cache entry + void clearVisibleGroup(LLSpatialGroup* group); // Like idleUpdate, but forces everything to complete regardless of // how long it takes. @@ -305,7 +313,8 @@ public: } eCacheUpdateResult; // handle a full update message - eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); + eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); + LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); LLDataPacker *getDP(U32 local_id, U32 crc, U8 &cache_miss_type); void requestCacheMisses(); void addCacheMissFull(const U32 local_id); @@ -322,6 +331,7 @@ public: virtual std::string getDescription() const; std::string getHttpUrl() const { return mHttpUrl ;} + U32 getNumOfActiveCachedObjects() const; LLSpatialPartition* getSpatialPartition(U32 type); bool objectIsReturnable(const LLVector3& pos, const std::vector& boxes) const; @@ -331,6 +341,15 @@ public: void getNeighboringRegions( std::vector& uniqueRegions ); void getNeighboringRegionsStatus( std::vector& regions ); +private: + void addToVOCacheTree(LLVOCacheEntry* entry); + LLViewerObject* addNewObject(LLVOCacheEntry* entry); + void killObject(LLVOCacheEntry* entry, std::vector& delete_list); + LLVOCacheEntry* getCacheEntry(U32 local_id); + void removeFromVOCacheTree(LLVOCacheEntry* entry); + void replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); + void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry + public: struct CompareDistance { @@ -408,18 +427,17 @@ private: // Maps local ids to cache entries. // Regions can have order 10,000 objects, so assume // a structure of size 2^14 = 16,000 - BOOL mCacheLoaded; - BOOL mCacheDirty; + BOOL mCacheLoaded; + BOOL mCacheDirty; + BOOL mAlive; // can become false if circuit disconnects + BOOL mCapabilitiesReceived; + BOOL mReleaseNotesRequested; + BOOL mDead; //if true, this region is in the process of deleting. LLDynamicArray mCacheMissFull; LLDynamicArray mCacheMissCRC; - - bool mAlive; // can become false if circuit disconnects - bool mCapabilitiesReceived; - caps_received_signal_t mCapabilitiesReceivedSignal; - - BOOL mReleaseNotesRequested; + caps_received_signal_t mCapabilitiesReceivedSignal; LLSD mSimulatorFeatures; }; -- cgit v1.2.3 From 5ae116f89b8459963ccb6ae9125d94ffaa79025e Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 31 Oct 2012 17:05:53 -0600 Subject: for SH-3471: create a simplified version of octree for object cache entries. --- indra/newview/llviewerregion.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 17654a8bc7..86d3ee0d8c 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -69,6 +69,8 @@ class LLBBox; class LLSpatialGroup; class LLDrawable; class LLViewerRegionImpl; +class LLviewerOctreeGroup; +class LLVOCachePartition; class LLViewerRegion: public LLCapabilityProvider // implements this interface { @@ -85,7 +87,7 @@ public: PARTITION_GRASS, PARTITION_VOLUME, PARTITION_BRIDGE, - PARTITION_HUD_PARTICLE, + PARTITION_HUD_PARTICLE, PARTITION_VO_CACHE, PARTITION_NONE, NUM_PARTITIONS @@ -218,12 +220,12 @@ public: F32 getWidth() const { return mWidth; } BOOL idleUpdate(F32 max_update_time); - void addVisibleGroup(LLSpatialGroup* group); + void addVisibleGroup(LLviewerOctreeGroup* group); void addVisibleCacheEntry(LLVOCacheEntry* entry); void addActiveCacheEntry(LLVOCacheEntry* entry); void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); void killCacheEntry(U32 local_id); //physically delete the cache entry - void clearVisibleGroup(LLSpatialGroup* group); + void clearVisibleGroup(LLviewerOctreeGroup* group); // Like idleUpdate, but forces everything to complete regardless of // how long it takes. @@ -333,6 +335,7 @@ public: U32 getNumOfActiveCachedObjects() const; LLSpatialPartition* getSpatialPartition(U32 type); + LLVOCachePartition* getVOCachePartition(); bool objectIsReturnable(const LLVector3& pos, const std::vector& boxes) const; bool childrenObjectReturnable( const std::vector& boxes ) const; @@ -350,6 +353,10 @@ private: void replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry + F32 killInvisibleObjects(F32 max_time); + F32 addLinkedSetChildren(F32 max_time, S32& max_num_objects); + F32 addVisibleObjects(F32 max_time, S32& max_num_objects); + public: struct CompareDistance { @@ -384,6 +391,7 @@ public: LLDynamicArray mMapAvatars; LLDynamicArray mMapAvatarIDs; + static LLViewerRegion* sCurRegionp; private: LLViewerRegionImpl * mImpl; -- cgit v1.2.3 From 819adb5eb4d7f982121f3dbd82750e05d26864d9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 00:26:44 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system final removal of remaining LLStat code --- indra/newview/llviewerregion.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index c9fffaf30e..756c0dc61f 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -34,7 +34,6 @@ #include "lldarray.h" #include "llwind.h" -#include "llstat.h" #include "v3dmath.h" #include "llstring.h" #include "llregionflags.h" @@ -351,9 +350,8 @@ public: LLWind mWind; LLViewerParcelOverlay *mParcelOverlay; - LLStat mBitStat; - LLStat mPacketsStat; - LLStat mPacketsLostStat; + F32 mBitsReceived; + F32 mPacketsReceived; LLMatrix4 mRenderMatrix; -- cgit v1.2.3 From c2859e4663c405950b6f433270ae558852330c76 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 8 Nov 2012 21:36:47 -0700 Subject: for SH-3472: prioritize object loading --- indra/newview/llviewerregion.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 86d3ee0d8c..9a47227f1c 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -317,7 +317,7 @@ public: // handle a full update message eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); - LLDataPacker *getDP(U32 local_id, U32 crc, U8 &cache_miss_type); + bool probeCache(U32 local_id, U32 crc, U8 &cache_miss_type); void requestCacheMisses(); void addCacheMissFull(const U32 local_id); @@ -354,8 +354,8 @@ private: void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry F32 killInvisibleObjects(F32 max_time); - F32 addLinkedSetChildren(F32 max_time, S32& max_num_objects); - F32 addVisibleObjects(F32 max_time, S32& max_num_objects); + F32 createVisibleObjects(F32 max_time); + F32 updateVisibleEntries(F32 max_time); //update visible entries public: struct CompareDistance -- cgit v1.2.3 From e1247d631f24065a31d9668915cb8bc84f3abc7f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 18 Dec 2012 14:36:46 -0700 Subject: fix for SH-3619: some objects are missing --- indra/newview/llviewerregion.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 9a47227f1c..dbc59cee8f 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -392,6 +392,7 @@ public: LLDynamicArray mMapAvatarIDs; static LLViewerRegion* sCurRegionp; + static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not. private: LLViewerRegionImpl * mImpl; -- cgit v1.2.3 From 45a7fe901aa4cd7af14fa1cb894da46a988e3aa2 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 15 Jan 2013 23:01:40 -0700 Subject: for SH-3653: Can we repurpose ObjectUpdateCached:ObjectData:UpdateFlags field to carry spatial+size data? --- indra/newview/llviewerregion.h | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 9252923aa3..4f0087ba7c 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -169,6 +169,9 @@ public: const LLVector3d &getOriginGlobal() const; LLVector3 getOriginAgent() const; + //estimate weight of cache missed object + F32 calcObjectWeight(U32 flags); + // Center is at the height of the water table. const LLVector3d &getCenterGlobal() const; LLVector3 getCenterAgent() const; @@ -316,7 +319,7 @@ public: // handle a full update message eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); - bool probeCache(U32 local_id, U32 crc, U8 &cache_miss_type); + bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type); void requestCacheMisses(); void addCacheMissFull(const U32 local_id); @@ -356,6 +359,7 @@ private: F32 createVisibleObjects(F32 max_time); F32 updateVisibleEntries(F32 max_time); //update visible entries + void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight); public: struct CompareDistance { @@ -441,8 +445,33 @@ private: BOOL mReleaseNotesRequested; BOOL mDead; //if true, this region is in the process of deleting. - LLDynamicArray mCacheMissFull; - LLDynamicArray mCacheMissCRC; + class CacheMissItem + { + public: + CacheMissItem(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight) : mID(id), mType(miss_type), mWeight(weight){} + + U32 mID; //local object id + LLViewerRegion::eCacheMissType mType; //cache miss type + F32 mWeight; //importance of this object to the current camera. + + struct Compare + { + bool operator()(const CacheMissItem& lhs, const CacheMissItem& rhs) + { + if(lhs.mWeight == rhs.mWeight) //larger weight first + { + return &lhs < &rhs; + } + else + { + return lhs.mWeight > rhs.mWeight; //larger weight first + } + } + }; + + typedef std::set cache_miss_list_t; + }; + CacheMissItem::cache_miss_list_t mCacheMissList; caps_received_signal_t mCapabilitiesReceivedSignal; LLSD mSimulatorFeatures; -- cgit v1.2.3 From 3ed1bee350ed93f81a484a7c073c12708e73e946 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 16 Jan 2013 22:03:48 -0700 Subject: trivial: convert to unix line endings. --- indra/newview/llviewerregion.h | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 4f0087ba7c..de14c0fe27 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -445,32 +445,32 @@ private: BOOL mReleaseNotesRequested; BOOL mDead; //if true, this region is in the process of deleting. - class CacheMissItem - { - public: - CacheMissItem(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight) : mID(id), mType(miss_type), mWeight(weight){} - - U32 mID; //local object id - LLViewerRegion::eCacheMissType mType; //cache miss type - F32 mWeight; //importance of this object to the current camera. - - struct Compare - { - bool operator()(const CacheMissItem& lhs, const CacheMissItem& rhs) - { - if(lhs.mWeight == rhs.mWeight) //larger weight first - { - return &lhs < &rhs; - } - else - { - return lhs.mWeight > rhs.mWeight; //larger weight first - } - } - }; - - typedef std::set cache_miss_list_t; - }; + class CacheMissItem + { + public: + CacheMissItem(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight) : mID(id), mType(miss_type), mWeight(weight){} + + U32 mID; //local object id + LLViewerRegion::eCacheMissType mType; //cache miss type + F32 mWeight; //importance of this object to the current camera. + + struct Compare + { + bool operator()(const CacheMissItem& lhs, const CacheMissItem& rhs) + { + if(lhs.mWeight == rhs.mWeight) //larger weight first + { + return &lhs < &rhs; + } + else + { + return lhs.mWeight > rhs.mWeight; //larger weight first + } + } + }; + + typedef std::set cache_miss_list_t; + }; CacheMissItem::cache_miss_list_t mCacheMissList; caps_received_signal_t mCapabilitiesReceivedSignal; -- cgit v1.2.3 From bd60fdbe44d9f996686d31cf48a3f2ca664dd301 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 28 Feb 2013 22:49:05 -0700 Subject: for SH-3824: interesting: Ensure viewer can handle object updates from entire region gracefully --- indra/newview/llviewerregion.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index de14c0fe27..6da8c191a4 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -317,6 +317,7 @@ public: } eCacheUpdateResult; // handle a full update message + eCacheUpdateResult cacheFullUpdate(LLDataPackerBinaryBuffer &dp); eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type); @@ -347,7 +348,7 @@ public: void getNeighboringRegionsStatus( std::vector& regions ); private: - void addToVOCacheTree(LLVOCacheEntry* entry); + void addToVOCacheTree(LLVOCacheEntry* entry, bool forced = false); LLViewerObject* addNewObject(LLVOCacheEntry* entry); void killObject(LLVOCacheEntry* entry, std::vector& delete_list); LLVOCacheEntry* getCacheEntry(U32 local_id); @@ -360,6 +361,7 @@ private: F32 updateVisibleEntries(F32 max_time); //update visible entries void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight); + void postProcesNewEntry(LLVOCacheEntry* entry); public: struct CompareDistance { @@ -445,6 +447,21 @@ private: BOOL mReleaseNotesRequested; BOOL mDead; //if true, this region is in the process of deleting. + class OrphanList + { + public: + OrphanList(){} + OrphanList(U32 child_id){addChild(child_id);} + + void addChild(U32 child_id) {mChildList.insert(child_id);} + std::set* getChildList() {return &mChildList;} + + private: + std::set mChildList; + }; + + std::map mOrphanMap; + class CacheMissItem { public: -- cgit v1.2.3 From 50b32cf2bdb93fad14770aa0f6b92fb3815ebdf0 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 7 Mar 2013 23:54:11 -0700 Subject: for SH-3937: interesting: implement the new cache probe logic --- indra/newview/llviewerregion.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 6da8c191a4..4fc74ee7c3 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -320,9 +320,13 @@ public: eCacheUpdateResult cacheFullUpdate(LLDataPackerBinaryBuffer &dp); eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); + LLVOCacheEntry* getCacheEntry(U32 local_id); bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type); void requestCacheMisses(); void addCacheMissFull(const U32 local_id); + //remove from object cache if the object receives a full-update or terse update + LLViewerObject* forceToRemoveFromCache(U32 local_id, LLViewerObject* objectp); + void findOrphans(U32 parent_id); void dumpCache(); @@ -348,10 +352,9 @@ public: void getNeighboringRegionsStatus( std::vector& regions ); private: - void addToVOCacheTree(LLVOCacheEntry* entry, bool forced = false); + void addToVOCacheTree(LLVOCacheEntry* entry); LLViewerObject* addNewObject(LLVOCacheEntry* entry); - void killObject(LLVOCacheEntry* entry, std::vector& delete_list); - LLVOCacheEntry* getCacheEntry(U32 local_id); + void killObject(LLVOCacheEntry* entry, std::vector& delete_list); void removeFromVOCacheTree(LLVOCacheEntry* entry); void replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry @@ -361,7 +364,7 @@ private: F32 updateVisibleEntries(F32 max_time); //update visible entries void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight); - void postProcesNewEntry(LLVOCacheEntry* entry); + void decodeBoundingInfo(LLVOCacheEntry* entry); public: struct CompareDistance { -- cgit v1.2.3 From 27bb36b1e796add58f319555bf761e417f7957ef Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 11 Mar 2013 21:23:15 -0600 Subject: for SH-3979: interesting: can not edit objects with new object cache code --- indra/newview/llviewerregion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 4fc74ee7c3..a903f61cbc 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -317,8 +317,8 @@ public: } eCacheUpdateResult; // handle a full update message - eCacheUpdateResult cacheFullUpdate(LLDataPackerBinaryBuffer &dp); - eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); + eCacheUpdateResult cacheFullUpdate(LLDataPackerBinaryBuffer &dp, U32 flags); + eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp, U32 flags); LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); LLVOCacheEntry* getCacheEntry(U32 local_id); bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type); -- cgit v1.2.3 From 4624848a6894be669cdb19a82101ea168c407ecd Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 13 Mar 2013 22:31:19 -0600 Subject: revert changes for SH-3653: Can we repurpose ObjectUpdateCached:ObjectData:UpdateFlags field to carry spatial+size data? --- indra/newview/llviewerregion.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index a903f61cbc..15c2b36e38 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -169,9 +169,6 @@ public: const LLVector3d &getOriginGlobal() const; LLVector3 getOriginAgent() const; - //estimate weight of cache missed object - F32 calcObjectWeight(U32 flags); - // Center is at the height of the water table. const LLVector3d &getCenterGlobal() const; LLVector3 getCenterAgent() const; @@ -363,7 +360,7 @@ private: F32 createVisibleObjects(F32 max_time); F32 updateVisibleEntries(F32 max_time); //update visible entries - void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight); + void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type); void decodeBoundingInfo(LLVOCacheEntry* entry); public: struct CompareDistance @@ -468,24 +465,16 @@ private: class CacheMissItem { public: - CacheMissItem(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight) : mID(id), mType(miss_type), mWeight(weight){} + CacheMissItem(U32 id, LLViewerRegion::eCacheMissType miss_type) : mID(id), mType(miss_type){} U32 mID; //local object id LLViewerRegion::eCacheMissType mType; //cache miss type - F32 mWeight; //importance of this object to the current camera. struct Compare { bool operator()(const CacheMissItem& lhs, const CacheMissItem& rhs) { - if(lhs.mWeight == rhs.mWeight) //larger weight first - { - return &lhs < &rhs; - } - else - { - return lhs.mWeight > rhs.mWeight; //larger weight first - } + return lhs.mID < rhs.mID; //smaller ID first. } }; -- cgit v1.2.3 From bbfb7b9ea1dc025d672968e39908b2327d14878a Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 20 Mar 2013 22:49:45 -0600 Subject: for SH-3918: Viewer should respond to cache probes in order received (don't sort response) --- indra/newview/llviewerregion.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 15c2b36e38..22936fb103 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -470,6 +470,7 @@ private: U32 mID; //local object id LLViewerRegion::eCacheMissType mType; //cache miss type +#if 0 struct Compare { bool operator()(const CacheMissItem& lhs, const CacheMissItem& rhs) @@ -479,6 +480,9 @@ private: }; typedef std::set cache_miss_list_t; +#else + typedef std::list cache_miss_list_t; +#endif }; CacheMissItem::cache_miss_list_t mCacheMissList; -- cgit v1.2.3 From 51e5997bd6f7f7d66a5843cf1d0b749b143460a8 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 29 Mar 2013 17:54:04 -0600 Subject: delay removing invalid objects from cache in case region is logged out too soon. --- indra/newview/llviewerregion.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 22936fb103..2248cf5269 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -399,6 +399,7 @@ public: static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not. private: LLViewerRegionImpl * mImpl; + LLFrameTimer mRegionTimer; F32 mWidth; // Width of region on a side (meters) U64 mHandle; -- cgit v1.2.3 From 674df12bc9e81b9b4290f74a96116dbbf1e7f77c Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 17 Apr 2013 23:00:36 -0600 Subject: for SH-4105: interesting: new viewer does not handle orphaned child prims in ObjectUpdateCompressed messages --- indra/newview/llviewerregion.h | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 2248cf5269..410c903f18 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -447,21 +447,9 @@ private: BOOL mCapabilitiesReceived; BOOL mReleaseNotesRequested; BOOL mDead; //if true, this region is in the process of deleting. - - class OrphanList - { - public: - OrphanList(){} - OrphanList(U32 child_id){addChild(child_id);} - - void addChild(U32 child_id) {mChildList.insert(child_id);} - std::set* getChildList() {return &mChildList;} - - private: - std::set mChildList; - }; - std::map mOrphanMap; + typedef std::map > orphan_list_t; + orphan_list_t mOrphanMap; class CacheMissItem { @@ -471,21 +459,9 @@ private: U32 mID; //local object id LLViewerRegion::eCacheMissType mType; //cache miss type -#if 0 - struct Compare - { - bool operator()(const CacheMissItem& lhs, const CacheMissItem& rhs) - { - return lhs.mID < rhs.mID; //smaller ID first. - } - }; - - typedef std::set cache_miss_list_t; -#else typedef std::list cache_miss_list_t; -#endif }; - CacheMissItem::cache_miss_list_t mCacheMissList; + CacheMissItem::cache_miss_list_t mCacheMissList; caps_received_signal_t mCapabilitiesReceivedSignal; LLSD mSimulatorFeatures; -- cgit v1.2.3 From 6b81b8629e67d82a7620e48781ded73b6e6126ea Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 5 May 2013 17:45:35 -0700 Subject: Spring cleaning: removed unused .cpp and.h files, and cleaned up header dependencies --- indra/newview/llviewerregion.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 410c903f18..a73898317b 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -225,6 +225,7 @@ public: void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); void killCacheEntry(U32 local_id); //physically delete the cache entry void clearVisibleGroup(LLviewerOctreeGroup* group); + bool hasVisibleGroup(LLviewerOctreeGroup* group); // Like idleUpdate, but forces everything to complete regardless of // how long it takes. -- cgit v1.2.3 From 7006cbe3a24a88da4182f5930bb0fe712c43ce8c Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 16 May 2013 16:58:04 -0600 Subject: fix for SH-4080: interesting: random crash on Mac --- indra/newview/llviewerregion.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index a73898317b..fefd4209aa 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -224,8 +224,6 @@ public: void addActiveCacheEntry(LLVOCacheEntry* entry); void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); void killCacheEntry(U32 local_id); //physically delete the cache entry - void clearVisibleGroup(LLviewerOctreeGroup* group); - bool hasVisibleGroup(LLviewerOctreeGroup* group); // Like idleUpdate, but forces everything to complete regardless of // how long it takes. @@ -396,7 +394,6 @@ public: LLDynamicArray mMapAvatars; LLDynamicArray mMapAvatarIDs; - static LLViewerRegion* sCurRegionp; static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not. private: LLViewerRegionImpl * mImpl; -- cgit v1.2.3 From a6dbd8e089b7d0f462a8ed753258a442b1861541 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 5 Jun 2013 18:01:25 -0600 Subject: fix for SH-4227: interesting: long delay between root and child prim loading. --- indra/newview/llviewerregion.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index fefd4209aa..196f363611 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -347,6 +347,9 @@ public: void getNeighboringRegions( std::vector& uniqueRegions ); void getNeighboringRegionsStatus( std::vector& regions ); + void removeFromCreatedList(U32 local_id); + void addToCreatedList(U32 local_id); + private: void addToVOCacheTree(LLVOCacheEntry* entry); LLViewerObject* addNewObject(LLVOCacheEntry* entry); @@ -361,6 +364,8 @@ private: void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type); void decodeBoundingInfo(LLVOCacheEntry* entry); + bool isNonCacheableObjectCreated(U32 local_id); + public: struct CompareDistance { -- cgit v1.2.3 From fc88265cffe3553803314c6e895a1e3a3c988171 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 13 Jun 2013 18:47:51 -0600 Subject: fix for SH-4241: viewer crash shortly after login in LLViewerRegion::addNewObject and SH-4261: interesting: crash in LLViewerRegion::addToVOCacheTree --- indra/newview/llviewerregion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index f3c4c080c1..78a6c782a9 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -367,7 +367,7 @@ private: LLViewerObject* addNewObject(LLVOCacheEntry* entry); void killObject(LLVOCacheEntry* entry, std::vector& delete_list); void removeFromVOCacheTree(LLVOCacheEntry* entry); - void replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); + void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry F32 killInvisibleObjects(F32 max_time); -- cgit v1.2.3 From 4cca9ba279f908f206fa5e32adccf1038f05cc7f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 29 Jul 2013 10:15:10 -0600 Subject: fix for SH-4293: texture console takes a while to settle down on Interesting viewer. --- indra/newview/llviewerregion.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 29483662e8..2ac934d19c 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -411,6 +411,7 @@ public: LLDynamicArray mMapAvatarIDs; static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not. + static S32 sLastCameraUpdated; private: LLViewerRegionImpl * mImpl; LLFrameTimer mRegionTimer; -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/llviewerregion.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 29483662e8..cc314dc43b 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -32,7 +32,6 @@ #include #include -#include "lldarray.h" #include "llwind.h" #include "v3dmath.h" #include "llstring.h" @@ -407,8 +406,8 @@ public: // messaging system in which the previous message only sends and parses the // positions stored in the first array so they're maintained separately until // we stop supporting the old CoarseLocationUpdate message. - LLDynamicArray mMapAvatars; - LLDynamicArray mMapAvatarIDs; + std::vector mMapAvatars; + std::vector mMapAvatarIDs; static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not. private: -- cgit v1.2.3 From 15fe4b3bbaf139960f934b629c236092182ed297 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 30 Jul 2013 22:05:12 -0600 Subject: fix for SH-4297: interesting: viewer-interesting starts loading cached scene late --- indra/newview/llviewerregion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 2ac934d19c..366462e22f 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -370,8 +370,8 @@ private: void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry - F32 killInvisibleObjects(F32 max_time); - F32 createVisibleObjects(F32 max_time); + F32 killInvisibleObjects(F32 max_time, S32 throttle); + F32 createVisibleObjects(F32 max_time, S32 throttle); F32 updateVisibleEntries(F32 max_time); //update visible entries void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type); -- cgit v1.2.3 From a6711a894c3c32ad24b47e36b2a52225713fd3ed Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 8 Aug 2013 16:45:55 -0600 Subject: fix for SH-4402: interesting: lower FPS with lots of objects in view --- indra/newview/llviewerregion.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index a8e0b7bba9..9d2a333b1b 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -220,6 +220,10 @@ public: // can process the message. static void processRegionInfo(LLMessageSystem* msg, void**); + //check if the viewer camera is static + static BOOL isViewerCameraStatic(); + static void calcNewObjectCreationThrottle(); + void setCacheID(const LLUUID& id); F32 getWidth() const { return mWidth; } @@ -345,6 +349,7 @@ public: virtual std::string getDescription() const; std::string getHttpUrl() const { return mHttpUrl ;} + U32 getNumOfVisibleGroups() const; U32 getNumOfActiveCachedObjects() const; LLSpatialPartition* getSpatialPartition(U32 type); LLVOCachePartition* getVOCachePartition(); @@ -359,7 +364,7 @@ public: LLViewerRegionImpl * getRegionImplNC() { return mImpl; } void removeFromCreatedList(U32 local_id); - void addToCreatedList(U32 local_id); + void addToCreatedList(U32 local_id); private: void addToVOCacheTree(LLVOCacheEntry* entry); @@ -369,8 +374,8 @@ private: void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry - F32 killInvisibleObjects(F32 max_time, S32 throttle); - F32 createVisibleObjects(F32 max_time, S32 throttle); + F32 killInvisibleObjects(F32 max_time); + F32 createVisibleObjects(F32 max_time); F32 updateVisibleEntries(F32 max_time); //update visible entries void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type); @@ -411,6 +416,10 @@ public: static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not. static S32 sLastCameraUpdated; + +private: + static S32 sNewObjectCreationThrottle; + private: LLViewerRegionImpl * mImpl; LLFrameTimer mRegionTimer; @@ -445,6 +454,9 @@ private: F32 mCameraDistanceSquared; // updated once per frame U8 mCentralBakeVersion; + LLVOCacheEntry* mLastVisitedEntry; + U32 mInvisibilityCheckHistory; + // Information for Homestead / CR-53 S32 mClassID; S32 mCPURatio; -- cgit v1.2.3 From 25937040de9a787c221aae7f178f43827c799028 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Aug 2013 12:38:12 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms converted many values over to units system in effort to track down source of 0 ping --- indra/newview/llviewerregion.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 9d2a333b1b..e07c2aa8d0 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -401,7 +401,7 @@ public: LLWind mWind; LLViewerParcelOverlay *mParcelOverlay; - F32 mBitsReceived; + F32Bits mBitsReceived; F32 mPacketsReceived; LLMatrix4 mRenderMatrix; @@ -436,14 +436,14 @@ private: BOOL mIsEstateManager; U32 mPacketsIn; - U32 mBitsIn; - U32 mLastBitsIn; + U32Bits mBitsIn, + mLastBitsIn; U32 mLastPacketsIn; U32 mPacketsOut; U32 mLastPacketsOut; S32 mPacketsLost; S32 mLastPacketsLost; - U32 mPingDelay; + U32Milliseconds mPingDelay; F32 mDeltaTime; // Time since last measurement of lastPackets, Bits, etc U64 mRegionFlags; // includes damage flags -- cgit v1.2.3 From ba4f64ed7ad64deeed5f7109f33c796bae0c4423 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 20 Sep 2013 11:40:30 -0600 Subject: fix for SH-4430: Interesting: Light objects behind you are not loaded at login. --- indra/newview/llviewerregion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index e07c2aa8d0..b2df8d5325 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -229,7 +229,7 @@ public: F32 getWidth() const { return mWidth; } BOOL idleUpdate(F32 max_update_time); - void addVisibleGroup(LLviewerOctreeGroup* group); + bool addVisibleGroup(LLviewerOctreeGroup* group); void addVisibleCacheEntry(LLVOCacheEntry* entry); void addActiveCacheEntry(LLVOCacheEntry* entry); void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); -- cgit v1.2.3 From 456ff3949a28542ecd89ec23b0287b55a166529f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 25 Sep 2013 16:40:05 -0600 Subject: fix for SH-4295: Interesting: Teleporting to previous location leave some objects invisible. --- indra/newview/llviewerregion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index b2df8d5325..8a375610d9 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -336,7 +336,7 @@ public: //remove from object cache if the object receives a full-update or terse update LLViewerObject* forceToRemoveFromCache(U32 local_id, LLViewerObject* objectp); void findOrphans(U32 parent_id); - + void clearCachedVisibleObjects(); void dumpCache(); void unpackRegionHandshake(); -- cgit v1.2.3 From c430673b95823f688c45d0fbda4198595bb41073 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 4 Oct 2013 17:54:24 -0600 Subject: more fix for SH-4521: Interesting viewer crash in Pipeline:RenderDrawPools --- indra/newview/llviewerregion.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 79a992a4c1..cc7ee5c6ee 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -373,6 +373,8 @@ public: void removeFromCreatedList(U32 local_id); void addToCreatedList(U32 local_id); + BOOL isPaused() const {return mPaused;} + private: void addToVOCacheTree(LLVOCacheEntry* entry); LLViewerObject* addNewObject(LLVOCacheEntry* entry); @@ -482,6 +484,7 @@ private: BOOL mCapabilitiesReceived; BOOL mReleaseNotesRequested; BOOL mDead; //if true, this region is in the process of deleting. + BOOL mPaused; //pause processing the objects in the region typedef std::map > orphan_list_t; orphan_list_t mOrphanMap; -- cgit v1.2.3 From 17df8988fec3f2ba991ca9e34ff8148253a2fc04 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 7 Oct 2013 13:38:03 -0700 Subject: renamed TraceType to StatType added more MemTrackable types optimized memory usage of LLTrace some more --- indra/newview/llviewerregion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 79a992a4c1..4e2252b75b 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -68,7 +68,7 @@ class LLBBox; class LLSpatialGroup; class LLDrawable; class LLViewerRegionImpl; -class LLviewerOctreeGroup; +class LLViewerOctreeGroup; class LLVOCachePartition; class LLViewerRegion: public LLCapabilityProvider // implements this interface @@ -230,7 +230,7 @@ public: F32 getWidth() const { return mWidth; } BOOL idleUpdate(F32 max_update_time); - bool addVisibleGroup(LLviewerOctreeGroup* group); + bool addVisibleGroup(LLViewerOctreeGroup* group); void addVisibleCacheEntry(LLVOCacheEntry* entry); void addActiveCacheEntry(LLVOCacheEntry* entry); void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); -- cgit v1.2.3 From 0ce7008521b776451c0ce38299fa87c9e64c63cd Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 4 Nov 2013 16:41:06 -0700 Subject: fix for SH-4596: Interesting: MacBook Pro has worse framerate than on Release --- indra/newview/llviewerregion.h | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 06a8d781a1..a6c1eb65d4 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -229,7 +229,8 @@ public: F32 getWidth() const { return mWidth; } - BOOL idleUpdate(F32 max_update_time); + void idleUpdate(F32 max_update_time); + void lightIdleUpdate(); bool addVisibleGroup(LLViewerOctreeGroup* group); void addVisibleCacheEntry(LLVOCacheEntry* entry); void addActiveCacheEntry(LLVOCacheEntry* entry); @@ -374,6 +375,9 @@ public: void addToCreatedList(U32 local_id); BOOL isPaused() const {return mPaused;} + S32 getLastUpdate() const {return mLastUpdate;} + + static BOOL isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;} private: void addToVOCacheTree(LLVOCacheEntry* entry); @@ -383,9 +387,9 @@ private: void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry - F32 killInvisibleObjects(F32 max_time); - F32 createVisibleObjects(F32 max_time); - F32 updateVisibleEntries(F32 max_time); //update visible entries + void killInvisibleObjects(F32 max_time); + void createVisibleObjects(F32 max_time); + void updateVisibleEntries(F32 max_time); //update visible entries void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type); void decodeBoundingInfo(LLVOCacheEntry* entry); @@ -426,9 +430,32 @@ public: static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not. static S32 sLastCameraUpdated; - LLFrameTimer & getRenderInfoRequestTimer() { return mRenderInfoRequestTimer; }; + struct CompareRegionByLastUpdate + { + bool operator()(const LLViewerRegion* const& lhs, const LLViewerRegion* const& rhs) + { + S32 lpa = lhs->getLastUpdate(); + S32 rpa = rhs->getLastUpdate(); + + //small mLastUpdate first + if(lpa < rpa) + { + return true; + } + else if(lpa > rpa) + { + return false; + } + else + { + return lhs < rhs; + } + } + }; + typedef std::set region_priority_list_t; + private: static S32 sNewObjectCreationThrottle; LLViewerRegionImpl * mImpl; @@ -437,6 +464,7 @@ private: F32 mWidth; // Width of region on a side (meters) U64 mHandle; F32 mTimeDilation; // time dilation of physics simulation on simulator + S32 mLastUpdate; //last time called idleUpdate() // simulator name std::string mName; -- cgit v1.2.3 From 4d70e20ede4ad404bf8ddeca2effb1171b471bcc Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 19 Nov 2013 19:33:28 -0700 Subject: fix for SH-4629: Interesting: crash at LLViewerRegion::killObject --- indra/newview/llviewerregion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index a6c1eb65d4..6889db7880 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -386,7 +386,7 @@ private: void removeFromVOCacheTree(LLVOCacheEntry* entry); void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry - + void removeDanglingEntry(LLVOCacheEntry* entry); void killInvisibleObjects(F32 max_time); void createVisibleObjects(F32 max_time); void updateVisibleEntries(F32 max_time); //update visible entries -- cgit v1.2.3 From 5979467198e9a8d4c065de908cf48c7d73101cd7 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 20 Nov 2013 11:43:09 -0700 Subject: revert changeset 05606ef22574: fix for SH-4629: Interesting: crash at LLViewerRegion::killObject --- indra/newview/llviewerregion.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 6889db7880..a789cc6715 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -386,7 +386,6 @@ private: void removeFromVOCacheTree(LLVOCacheEntry* entry); void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry - void removeDanglingEntry(LLVOCacheEntry* entry); void killInvisibleObjects(F32 max_time); void createVisibleObjects(F32 max_time); void updateVisibleEntries(F32 max_time); //update visible entries -- cgit v1.2.3 From c14ecc817895d06b04a803a88d00d4ae1c80060a Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 21 Nov 2013 11:20:45 -0700 Subject: fix for SH-4629: Interesting: crash at LLViewerRegion::killObject --- indra/newview/llviewerregion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index a789cc6715..0f27def8a5 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -235,7 +235,7 @@ public: void addVisibleCacheEntry(LLVOCacheEntry* entry); void addActiveCacheEntry(LLVOCacheEntry* entry); void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); - void killCacheEntry(U32 local_id); //physically delete the cache entry + void killCacheEntry(U32 local_id, bool kill_obj = true); //physically delete the cache entry // Like idleUpdate, but forces everything to complete regardless of // how long it takes. @@ -385,7 +385,7 @@ private: void killObject(LLVOCacheEntry* entry, std::vector& delete_list); void removeFromVOCacheTree(LLVOCacheEntry* entry); void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); - void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry + void killCacheEntry(LLVOCacheEntry* entry, bool kill_obj = true); //physically delete the cache entry void killInvisibleObjects(F32 max_time); void createVisibleObjects(F32 max_time); void updateVisibleEntries(F32 max_time); //update visible entries -- cgit v1.2.3 From 04aece3282025ed0f117a9ade96edc0bf906b3cf Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 22 Nov 2013 20:55:57 -0700 Subject: fix for SH-4635: Interesting: Some objects do not load on the second visit --- indra/newview/llviewerregion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 0f27def8a5..a789cc6715 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -235,7 +235,7 @@ public: void addVisibleCacheEntry(LLVOCacheEntry* entry); void addActiveCacheEntry(LLVOCacheEntry* entry); void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); - void killCacheEntry(U32 local_id, bool kill_obj = true); //physically delete the cache entry + void killCacheEntry(U32 local_id); //physically delete the cache entry // Like idleUpdate, but forces everything to complete regardless of // how long it takes. @@ -385,7 +385,7 @@ private: void killObject(LLVOCacheEntry* entry, std::vector& delete_list); void removeFromVOCacheTree(LLVOCacheEntry* entry); void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); - void killCacheEntry(LLVOCacheEntry* entry, bool kill_obj = true); //physically delete the cache entry + void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry void killInvisibleObjects(F32 max_time); void createVisibleObjects(F32 max_time); void updateVisibleEntries(F32 max_time); //update visible entries -- cgit v1.2.3 From 4a3e01f8dc1e8cf38183c9be564c7f4fa5dd49d3 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 4 Dec 2013 12:36:28 -0700 Subject: fix for SH-4631: Parts of linked objects are not shown in new release Second Life 3.6.11 --- indra/newview/llviewerregion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index a789cc6715..6c20282ecd 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -335,8 +335,8 @@ public: bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type); void requestCacheMisses(); void addCacheMissFull(const U32 local_id); - //remove from object cache if the object receives a full-update or terse update - LLViewerObject* forceToRemoveFromCache(U32 local_id, LLViewerObject* objectp); + //update object cache if the object receives a full-update or terse update + LLViewerObject* updateCacheEntry(U32 local_id, LLViewerObject* objectp, U32 update_type); void findOrphans(U32 parent_id); void clearCachedVisibleObjects(); void dumpCache(); -- cgit v1.2.3 From 24a2ba735540f896bb84dfdbaff8644b1d60044b Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 5 Dec 2013 17:41:29 -0700 Subject: fix for SH-4631: Parts of linked objects are not shown in new release Second Life 3.6.11 --- indra/newview/llviewerregion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 6c20282ecd..2085f83f32 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -385,7 +385,7 @@ private: void killObject(LLVOCacheEntry* entry, std::vector& delete_list); void removeFromVOCacheTree(LLVOCacheEntry* entry); void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); - void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry + void killCacheEntry(LLVOCacheEntry* entry, bool for_rendering = false); //physically delete the cache entry void killInvisibleObjects(F32 max_time); void createVisibleObjects(F32 max_time); void updateVisibleEntries(F32 max_time); //update visible entries -- cgit v1.2.3 From 10ae6a779e6726da24acb0ae60bb8f430daf9bdb Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 6 Jan 2014 12:28:36 -0700 Subject: fix for SH-4656: crash at LLVOCacheEntry::updateParentBoundingInfo() line 510 --- indra/newview/llviewerregion.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 2085f83f32..7ce191fe8f 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -331,7 +331,7 @@ public: eCacheUpdateResult cacheFullUpdate(LLDataPackerBinaryBuffer &dp, U32 flags); eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp, U32 flags); LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); - LLVOCacheEntry* getCacheEntry(U32 local_id); + LLVOCacheEntry* getCacheEntry(U32 local_id, bool valid = true); bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type); void requestCacheMisses(); void addCacheMissFull(const U32 local_id); @@ -384,7 +384,6 @@ private: LLViewerObject* addNewObject(LLVOCacheEntry* entry); void killObject(LLVOCacheEntry* entry, std::vector& delete_list); void removeFromVOCacheTree(LLVOCacheEntry* entry); - void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); void killCacheEntry(LLVOCacheEntry* entry, bool for_rendering = false); //physically delete the cache entry void killInvisibleObjects(F32 max_time); void createVisibleObjects(F32 max_time); -- cgit v1.2.3 From b49170b732e6e4b2cf11b40c12b3d75a8709cf5c Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 31 Jan 2014 18:24:55 -0700 Subject: fix some flaws for memory corruption --- indra/newview/llviewerregion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerregion.h') diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 7ce191fe8f..7f6a8186a5 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -232,7 +232,7 @@ public: void idleUpdate(F32 max_update_time); void lightIdleUpdate(); bool addVisibleGroup(LLViewerOctreeGroup* group); - void addVisibleCacheEntry(LLVOCacheEntry* entry); + void addVisibleChildCacheEntry(LLVOCacheEntry* parent, LLVOCacheEntry* child); void addActiveCacheEntry(LLVOCacheEntry* entry); void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); void killCacheEntry(U32 local_id); //physically delete the cache entry -- cgit v1.2.3