Merge viewer-neko

Fri, 02 Mar 2018 10:52:44 +0100

author
Ansariel
date
Fri, 02 Mar 2018 10:52:44 +0100
changeset 55314
3db9986f3dc2
parent 55308
b0549f776466
parent 55313
e817ee85d86a
child 55315
f2ac539fe313

Merge viewer-neko

indra/llrender/llrender.h file | annotate | diff | revisions
indra/llvfs/lldir_win32.cpp file | annotate | diff | revisions
indra/newview/llfloaterimcontainer.cpp file | annotate | diff | revisions
indra/newview/lllocalbitmaps.cpp file | annotate | diff | revisions
indra/newview/lllocalbitmaps.h file | annotate | diff | revisions
indra/newview/llviewertexture.cpp file | annotate | diff | revisions
indra/newview/llviewertexture.h file | annotate | diff | revisions
indra/newview/llvovolume.cpp file | annotate | diff | revisions
indra/newview/llvovolume.h file | annotate | diff | revisions
     1.1 --- a/indra/llrender/llrender.h	Fri Mar 02 10:51:20 2018 +0100
     1.2 +++ b/indra/llrender/llrender.h	Fri Mar 02 10:52:44 2018 +0100
     1.3 @@ -269,6 +269,13 @@
     1.4  		SPECULAR_MAP,
     1.5  		NUM_TEXTURE_CHANNELS,
     1.6  	};
     1.7 +
     1.8 +	enum eVolumeTexIndex
     1.9 +	{
    1.10 +		LIGHT_TEX = 0,
    1.11 +		SCULPT_TEX,
    1.12 +		NUM_VOLUME_TEXTURE_CHANNELS,
    1.13 +	};
    1.14  	
    1.15  	typedef enum {
    1.16  		TRIANGLES = 0,
     2.1 --- a/indra/llvfs/lldir_win32.cpp	Fri Mar 02 10:51:20 2018 +0100
     2.2 +++ b/indra/llvfs/lldir_win32.cpp	Fri Mar 02 10:52:44 2018 +0100
     2.3 @@ -285,7 +285,7 @@
     2.4  		LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
     2.5  	}
     2.6  
     2.7 -	mCAFile = gDirUtilp->getExpandedFilename( LL_PATH_EXECUTABLE, "ca-bundle.crt" );
     2.8 +	mCAFile = getExpandedFilename( LL_PATH_EXECUTABLE, "ca-bundle.crt" );
     2.9  }
    2.10  
    2.11  U32 LLDir_Win32::countFilesInDir(const std::string &dirname, const std::string &mask)
     3.1 --- a/indra/newview/llfloaterimcontainer.cpp	Fri Mar 02 10:51:20 2018 +0100
     3.2 +++ b/indra/newview/llfloaterimcontainer.cpp	Fri Mar 02 10:52:44 2018 +0100
     3.3 @@ -2277,6 +2277,7 @@
     3.4  // This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater.
     3.5  void LLFloaterIMContainer::onClickCloseBtn(bool app_quitting/* = false*/)
     3.6  {
     3.7 +	gSavedPerAccountSettings.setS32("ConversationsListPaneWidth", mConversationsPane->getRect().getWidth());
     3.8  	LLMultiFloater::closeFloater(app_quitting);
     3.9  }
    3.10  
     4.1 --- a/indra/newview/lllocalbitmaps.cpp	Fri Mar 02 10:51:20 2018 +0100
     4.2 +++ b/indra/newview/lllocalbitmaps.cpp	Fri Mar 02 10:52:44 2018 +0100
     4.3 @@ -361,8 +361,9 @@
     4.4  	updateUserPrims(old_id, new_id, LLRender::DIFFUSE_MAP);
     4.5  	updateUserPrims(old_id, new_id, LLRender::NORMAL_MAP);
     4.6  	updateUserPrims(old_id, new_id, LLRender::SPECULAR_MAP);
     4.7 -	
     4.8 -	updateUserSculpts(old_id, new_id); // isn't there supposed to be an IMG_DEFAULT_SCULPT or something?
     4.9 +
    4.10 +	updateUserVolumes(old_id, new_id, LLRender::LIGHT_TEX);	
    4.11 +	updateUserVolumes(old_id, new_id, LLRender::SCULPT_TEX); // isn't there supposed to be an IMG_DEFAULT_SCULPT or something?
    4.12  	
    4.13  	// default safeguard image for layers
    4.14  	if( new_id == IMG_DEFAULT )
    4.15 @@ -505,26 +506,39 @@
    4.16  			}
    4.17  		}
    4.18  	}
    4.19 -	
    4.20  }
    4.21  
    4.22 -void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id)
    4.23 +void LLLocalBitmap::updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel)
    4.24  {
    4.25  	LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD);
    4.26 -	for(U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(); volume_iter++)
    4.27 +	for (U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(channel); volume_iter++)
    4.28  	{
    4.29 -		LLVOVolume* volume_to_object = (*old_texture->getVolumeList())[volume_iter];
    4.30 -		LLViewerObject* object = (LLViewerObject*)volume_to_object;
    4.31 -	
    4.32 -		if(object)
    4.33 +		LLVOVolume* volobjp = (*old_texture->getVolumeList(channel))[volume_iter];
    4.34 +		switch (channel)
    4.35  		{
    4.36 -			if (object->isSculpted() && object->getVolume() &&
    4.37 -				object->getVolume()->getParams().getSculptID() == old_id)
    4.38 +			case LLRender::LIGHT_TEX:
    4.39  			{
    4.40 -				LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
    4.41 -				LLSculptParams new_params(*old_params);
    4.42 -				new_params.setSculptTexture(new_id, (*old_params).getSculptType());
    4.43 -				object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE);
    4.44 +				if (volobjp->getLightTextureID() == old_id)
    4.45 +				{
    4.46 +					volobjp->setLightTextureID(new_id);
    4.47 +				}
    4.48 +				break;
    4.49 +			}
    4.50 +			case LLRender::SCULPT_TEX:
    4.51 +			{
    4.52 +				LLViewerObject* object = (LLViewerObject*)volobjp;
    4.53 +
    4.54 +				if (object)
    4.55 +				{
    4.56 +					if (object->isSculpted() && object->getVolume() &&
    4.57 +						object->getVolume()->getParams().getSculptID() == old_id)
    4.58 +					{
    4.59 +						LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
    4.60 +						LLSculptParams new_params(*old_params);
    4.61 +						new_params.setSculptTexture(new_id, (*old_params).getSculptType());
    4.62 +						object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE);
    4.63 +					}
    4.64 +				}
    4.65  			}
    4.66  		}
    4.67  	}
     5.1 --- a/indra/newview/lllocalbitmaps.h	Fri Mar 02 10:51:20 2018 +0100
     5.2 +++ b/indra/newview/lllocalbitmaps.h	Fri Mar 02 10:52:44 2018 +0100
     5.3 @@ -64,7 +64,7 @@
     5.4  		void replaceIDs(LLUUID old_id, LLUUID new_id);
     5.5  		std::vector<LLViewerObject*> prepUpdateObjects(LLUUID old_id, U32 channel);
     5.6  		void updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel);
     5.7 -		void updateUserSculpts(LLUUID old_id, LLUUID new_id);
     5.8 +		void updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel);
     5.9  		void updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableType::EType type);
    5.10  		LLAvatarAppearanceDefines::ETextureIndex getTexIndex(LLWearableType::EType type, LLAvatarAppearanceDefines::EBakedTextureIndex baked_texind);
    5.11  
     6.1 --- a/indra/newview/llviewertexture.cpp	Fri Mar 02 10:51:20 2018 +0100
     6.2 +++ b/indra/newview/llviewertexture.cpp	Fri Mar 02 10:52:44 2018 +0100
     6.3 @@ -707,14 +707,16 @@
     6.4  	mAdditionalDecodePriority = 0.f;	
     6.5  	mParcelMedia = NULL;
     6.6  	
     6.7 -	mNumVolumes = 0;
     6.8 +	memset(&mNumVolumes, 0, sizeof(U32)* LLRender::NUM_VOLUME_TEXTURE_CHANNELS);
     6.9  	mFaceList[LLRender::DIFFUSE_MAP].clear();
    6.10  	mFaceList[LLRender::NORMAL_MAP].clear();
    6.11  	mFaceList[LLRender::SPECULAR_MAP].clear();
    6.12  	mNumFaces[LLRender::DIFFUSE_MAP] = 
    6.13  	mNumFaces[LLRender::NORMAL_MAP] = 
    6.14  	mNumFaces[LLRender::SPECULAR_MAP] = 0;
    6.15 -	mVolumeList.clear();
    6.16 +	
    6.17 +	mVolumeList[LLRender::LIGHT_TEX].clear();
    6.18 +	mVolumeList[LLRender::SCULPT_TEX].clear();
    6.19  }
    6.20  
    6.21  //virtual 
    6.22 @@ -730,7 +732,8 @@
    6.23  	mFaceList[LLRender::DIFFUSE_MAP].clear();
    6.24  	mFaceList[LLRender::NORMAL_MAP].clear();
    6.25  	mFaceList[LLRender::SPECULAR_MAP].clear();
    6.26 -	mVolumeList.clear();
    6.27 +	mVolumeList[LLRender::LIGHT_TEX].clear();
    6.28 +	mVolumeList[LLRender::SCULPT_TEX].clear();
    6.29  }
    6.30  
    6.31  void LLViewerTexture::notifyAboutCreatingTexture()
    6.32 @@ -947,40 +950,40 @@
    6.33  
    6.34  
    6.35  //virtual
    6.36 -void LLViewerTexture::addVolume(LLVOVolume* volumep) 
    6.37 +void LLViewerTexture::addVolume(U32 ch, LLVOVolume* volumep)
    6.38  {
    6.39 -	if( mNumVolumes >= mVolumeList.size())
    6.40 -	{
    6.41 -		mVolumeList.resize(2 * mNumVolumes + 1);		
    6.42 -	}
    6.43 -	mVolumeList[mNumVolumes] = volumep;
    6.44 -	volumep->setIndexInTex(mNumVolumes);
    6.45 -	mNumVolumes++;
    6.46 +	if (mNumVolumes[ch] >= mVolumeList[ch].size())
    6.47 +	{
    6.48 +		mVolumeList[ch].resize(2 * mNumVolumes[ch] + 1);
    6.49 +	}
    6.50 +	mVolumeList[ch][mNumVolumes[ch]] = volumep;
    6.51 +	volumep->setIndexInTex(ch, mNumVolumes[ch]);
    6.52 +	mNumVolumes[ch]++;
    6.53  	mLastVolumeListUpdateTimer.reset();
    6.54  }
    6.55  
    6.56  //virtual
    6.57 -void LLViewerTexture::removeVolume(LLVOVolume* volumep) 
    6.58 +void LLViewerTexture::removeVolume(U32 ch, LLVOVolume* volumep)
    6.59  {
    6.60 -	if(mNumVolumes > 1)
    6.61 -	{
    6.62 -		S32 index = volumep->getIndexInTex(); 
    6.63 -		llassert(index < mVolumeList.size());
    6.64 -		llassert(index < mNumVolumes);
    6.65 -		mVolumeList[index] = mVolumeList[--mNumVolumes];
    6.66 -		mVolumeList[index]->setIndexInTex(index);
    6.67 +	if (mNumVolumes[ch] > 1)
    6.68 +	{
    6.69 +		S32 index = volumep->getIndexInTex(ch); 
    6.70 +		llassert(index < mVolumeList[ch].size());
    6.71 +		llassert(index < mNumVolumes[ch]);
    6.72 +		mVolumeList[ch][index] = mVolumeList[ch][--mNumVolumes[ch]];
    6.73 +		mVolumeList[ch][index]->setIndexInTex(ch, index);
    6.74  	}
    6.75  	else 
    6.76  	{
    6.77 -		mVolumeList.clear();
    6.78 -		mNumVolumes = 0;
    6.79 +		mVolumeList[ch].clear();
    6.80 +		mNumVolumes[ch] = 0;
    6.81  	}
    6.82  	mLastVolumeListUpdateTimer.reset();
    6.83  }
    6.84  
    6.85 -S32 LLViewerTexture::getNumVolumes() const
    6.86 +S32 LLViewerTexture::getNumVolumes(U32 ch) const
    6.87  {
    6.88 -	return mNumVolumes;
    6.89 +	return mNumVolumes[ch];
    6.90  }
    6.91  
    6.92  void LLViewerTexture::reorganizeFaceList()
    6.93 @@ -1011,18 +1014,25 @@
    6.94  	static const F32 MAX_WAIT_TIME = 20.f; // seconds
    6.95  	static const U32 MAX_EXTRA_BUFFER_SIZE = 4;
    6.96  
    6.97 -	if(mNumVolumes + MAX_EXTRA_BUFFER_SIZE > mVolumeList.size())
    6.98 +
    6.99 +	for (U32 i = 0; i < LLRender::NUM_VOLUME_TEXTURE_CHANNELS; ++i)
   6.100 +	{
   6.101 +		if (mNumVolumes[i] + MAX_EXTRA_BUFFER_SIZE > mVolumeList[i].size())
   6.102 +		{
   6.103 +			return;
   6.104 +		}
   6.105 +	}
   6.106 +
   6.107 +	if(mLastVolumeListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME)
   6.108  	{
   6.109  		return;
   6.110  	}
   6.111  
   6.112 -	if(mLastVolumeListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME)
   6.113 -	{
   6.114 -		return;
   6.115 -	}
   6.116 -
   6.117  	mLastVolumeListUpdateTimer.reset();
   6.118 -	mVolumeList.erase(mVolumeList.begin() + mNumVolumes, mVolumeList.end());
   6.119 +	for (U32 i = 0; i < LLRender::NUM_VOLUME_TEXTURE_CHANNELS; ++i)
   6.120 +	{
   6.121 +		mVolumeList[i].erase(mVolumeList[i].begin() + mNumVolumes[i], mVolumeList[i].end());
   6.122 +	}
   6.123  }
   6.124  
   6.125  //virtual
     7.1 --- a/indra/newview/llviewertexture.h	Fri Mar 02 10:51:20 2018 +0100
     7.2 +++ b/indra/newview/llviewertexture.h	Fri Mar 02 10:52:44 2018 +0100
     7.3 @@ -159,10 +159,10 @@
     7.4  	S32 getNumFaces(U32 ch) const;
     7.5  	const ll_face_list_t* getFaceList(U32 channel) const {llassert(channel < LLRender::NUM_TEXTURE_CHANNELS); return &mFaceList[channel];}
     7.6  
     7.7 -	virtual void addVolume(LLVOVolume* volumep);
     7.8 -	virtual void removeVolume(LLVOVolume* volumep);
     7.9 -	S32 getNumVolumes() const;
    7.10 -	const ll_volume_list_t* getVolumeList() const { return &mVolumeList; }
    7.11 +	virtual void addVolume(U32 channel, LLVOVolume* volumep);
    7.12 +	virtual void removeVolume(U32 channel, LLVOVolume* volumep);
    7.13 +	S32 getNumVolumes(U32 channel) const;
    7.14 +	const ll_volume_list_t* getVolumeList(U32 channel) const { return &mVolumeList[channel]; }
    7.15  
    7.16  	
    7.17  	virtual void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
    7.18 @@ -206,8 +206,8 @@
    7.19  	U32               mNumFaces[LLRender::NUM_TEXTURE_CHANNELS];
    7.20  	LLFrameTimer      mLastFaceListUpdateTimer ;
    7.21  
    7.22 -	ll_volume_list_t  mVolumeList;
    7.23 -	U32					mNumVolumes;
    7.24 +	ll_volume_list_t  mVolumeList[LLRender::NUM_VOLUME_TEXTURE_CHANNELS];
    7.25 +	U32					mNumVolumes[LLRender::NUM_VOLUME_TEXTURE_CHANNELS];
    7.26  	LLFrameTimer	  mLastVolumeListUpdateTimer;
    7.27  
    7.28  	//do not use LLPointer here.
     8.1 --- a/indra/newview/llvovolume.cpp	Fri Mar 02 10:51:20 2018 +0100
     8.2 +++ b/indra/newview/llvovolume.cpp	Fri Mar 02 10:52:44 2018 +0100
     8.3 @@ -237,7 +237,7 @@
     8.4  
     8.5  	mMediaImplList.resize(getNumTEs());
     8.6  	mLastFetchedMediaVersion = -1;
     8.7 -	mIndexInTex = 0;
     8.8 +	memset(&mIndexInTex, 0, sizeof(S32) * LLRender::NUM_VOLUME_TEXTURE_CHANNELS);
     8.9  	mMDCImplCount = 0;
    8.10  }
    8.11  
    8.12 @@ -279,7 +279,11 @@
    8.13  
    8.14  		if (mSculptTexture.notNull())
    8.15  		{
    8.16 -			mSculptTexture->removeVolume(this);
    8.17 +			mSculptTexture->removeVolume(LLRender::SCULPT_TEX, this);
    8.18 +		}
    8.19 +		if (hasLightTexture())
    8.20 +		{
    8.21 +			getLightTexture()->removeVolume(LLRender::LIGHT_TEX, this);
    8.22  		}
    8.23  	}
    8.24  	
    8.25 @@ -1230,11 +1234,11 @@
    8.26  	{
    8.27  		if (old_sculpt.notNull())
    8.28  		{
    8.29 -			old_sculpt->removeVolume(this);
    8.30 +			old_sculpt->removeVolume(LLRender::SCULPT_TEX, this);
    8.31  		}
    8.32  		if (mSculptTexture.notNull())
    8.33  		{
    8.34 -			mSculptTexture->addVolume(this);
    8.35 +			mSculptTexture->addVolume(LLRender::SCULPT_TEX, this);
    8.36  		}
    8.37  	}
    8.38  	
    8.39 @@ -1347,9 +1351,9 @@
    8.40  		getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level, mSculptTexture->isMissingAsset());
    8.41  
    8.42  		//notify rebuild any other VOVolumes that reference this sculpty volume
    8.43 -		for (S32 i = 0; i < mSculptTexture->getNumVolumes(); ++i)
    8.44 -		{
    8.45 -			LLVOVolume* volume = (*(mSculptTexture->getVolumeList()))[i];
    8.46 +		for (S32 i = 0; i < mSculptTexture->getNumVolumes(LLRender::SCULPT_TEX); ++i)
    8.47 +		{
    8.48 +			LLVOVolume* volume = (*(mSculptTexture->getVolumeList(LLRender::SCULPT_TEX)))[i];
    8.49  			if (volume != this && volume->getVolume() == getVolume())
    8.50  			{
    8.51  				gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY, FALSE);
    8.52 @@ -3026,23 +3030,30 @@
    8.53  
    8.54  void LLVOVolume::setLightTextureID(LLUUID id)
    8.55  {
    8.56 +	LLViewerTexture* old_texturep = getLightTexture(); // same as mLightTexture, but inits if nessesary
    8.57  	if (id.notNull())
    8.58  	{
    8.59  		if (!hasLightTexture())
    8.60  		{
    8.61  			setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, TRUE, true);
    8.62  		}
    8.63 +		else
    8.64 +		{
    8.65 +			old_texturep->removeVolume(LLRender::LIGHT_TEX, this);
    8.66 +		}
    8.67  		LLLightImageParams* param_block = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE);
    8.68  		if (param_block && param_block->getLightTexture() != id)
    8.69  		{
    8.70  			param_block->setLightTexture(id);
    8.71  			parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true);
    8.72  		}
    8.73 +		getLightTexture()->addVolume(LLRender::LIGHT_TEX, this); // new texture
    8.74  	}
    8.75  	else
    8.76  	{
    8.77  		if (hasLightTexture())
    8.78  		{
    8.79 +			old_texturep->removeVolume(LLRender::LIGHT_TEX, this);
    8.80  			setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, FALSE, true);
    8.81  			parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true);
    8.82  			mLightTexture = NULL;
     9.1 --- a/indra/newview/llvovolume.h	Fri Mar 02 10:51:20 2018 +0100
     9.2 +++ b/indra/newview/llvovolume.h	Fri Mar 02 10:52:44 2018 +0100
     9.3 @@ -206,10 +206,10 @@
     9.4  	/*virtual*/ BOOL 	setMaterial(const U8 material);
     9.5  
     9.6  				void	setTexture(const S32 face);
     9.7 -				S32     getIndexInTex() const {return mIndexInTex ;}
     9.8 +				S32     getIndexInTex(U32 ch) const {return mIndexInTex[ch];}
     9.9  	/*virtual*/ BOOL	setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false);
    9.10  				void	updateSculptTexture();
    9.11 -				void    setIndexInTex(S32 index) { mIndexInTex = index ;}
    9.12 +				void    setIndexInTex(U32 ch, S32 index) { mIndexInTex[ch] = index ;}
    9.13  				void	sculpt();
    9.14  	 static     void    rebuildMeshAssetCallback(LLVFS *vfs,
    9.15  														  const LLUUID& asset_uuid,
    9.16 @@ -377,7 +377,7 @@
    9.17  	LLPointer<LLViewerFetchedTexture> mLightTexture;
    9.18  	media_list_t mMediaImplList;
    9.19  	S32			mLastFetchedMediaVersion; // as fetched from the server, starts as -1
    9.20 -	S32 mIndexInTex;
    9.21 +	S32 mIndexInTex[LLRender::NUM_VOLUME_TEXTURE_CHANNELS];
    9.22  	S32 mMDCImplCount;
    9.23  
    9.24  	LLPointer<LLRiggedVolume> mRiggedVolume;
    10.1 --- a/indra/newview/skins/default/xui/en/fonts.xml	Fri Mar 02 10:51:20 2018 +0100
    10.2 +++ b/indra/newview/skins/default/xui/en/fonts.xml	Fri Mar 02 10:52:44 2018 +0100
    10.3 @@ -4,6 +4,7 @@
    10.4    <font name="default" comment="default font files (global fallbacks)">
    10.5      <file>DejaVuSans.ttf</file>
    10.6      <os name="Windows">
    10.7 +      <file>meiryo.TTC</file>
    10.8        <file>MSGOTHIC.TTC</file>
    10.9        <file>gulim.ttc</file>
   10.10        <file>simhei.ttf</file>

mercurial