diff options
| -rwxr-xr-x | indra/newview/llvocache.cpp | 7 | ||||
| -rwxr-xr-x | indra/newview/llvocache.h | 1 | 
2 files changed, 4 insertions, 4 deletions
| diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index e3a3f0510b..dfc9ee57d8 100755 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -492,6 +492,7 @@ LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)  	mRegionp = regionp;  	mPartitionType = LLViewerRegion::PARTITION_VO_CACHE;  	mBackSlectionEnabled = -1; +	mIdleHash = 0;  	for(S32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)  	{ @@ -721,17 +722,15 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)  	if(!mCullHistory[LLViewerCamera::sCurCameraID] && LLViewerRegion::isViewerCameraStatic())  	{ -		static U32 hash = 0; -  		U32 seed = llmax(mLODPeriod >> 1, (U32)4);  		if(LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)  		{  			if(!(LLViewerOctreeEntryData::getCurrentFrame() % seed))  			{ -				hash = (hash + 1) % seed; +				mIdleHash = (mIdleHash + 1) % seed;  			}  		} -		if(LLViewerOctreeEntryData::getCurrentFrame() % seed != hash) +		if(LLViewerOctreeEntryData::getCurrentFrame() % seed != mIdleHash)  		{  			selectBackObjects(camera);//process back objects selection  			return 0; //nothing changed, reduce frequency of culling diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index bab3be26b8..867f9ab93c 100755 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -184,6 +184,7 @@ private:  	std::set<LLOcclusionCullingGroup*> mOccludedGroups;  	S32   mBackSlectionEnabled; //enable to select back objects if > 0. +	U32   mIdleHash;  };  // | 
