diff options
31 files changed, 211 insertions, 107 deletions
| diff --git a/doc/contributions.txt b/doc/contributions.txt index 10d6818bd3..4f9af68e3b 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -477,6 +477,7 @@ Hiro Sommambulist  Hitomi Tiponi  	STORM-1741  	STORM-1862 +	BUG-1067  Holger Gilruth  Horatio Freund  Hoze Menges diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 9bb3077797..9bb3077797 100755..100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index a88ac148ef..3f8d1baddd 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -666,8 +666,17 @@ void LLImageRaw::fill( const LLColor4U& color )  	}  } +LLPointer<LLImageRaw> LLImageRaw::duplicate() +{ +	if(getNumRefs() < 2) +	{ +		return this; //nobody else refences to this image, no need to duplicate. +	} - +	//make a duplicate +	LLPointer<LLImageRaw> dup = new LLImageRaw(getData(), getWidth(), getHeight(), getComponents()); +	return dup;  +}  // Src and dst can be any size.  Src and dst can each have 3 or 4 components.  void LLImageRaw::copy(LLImageRaw* src) diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 6cb1226da0..1d56411ae8 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -30,6 +30,7 @@  #include "lluuid.h"  #include "llstring.h"  #include "llthread.h" +#include "llpointer.h"  const S32 MIN_IMAGE_MIP =  2; // 4x4, only used for expand/contract power of 2  const S32 MAX_IMAGE_MIP = 11; // 2048x2048 @@ -214,6 +215,9 @@ public:  	// Copy operations +	//duplicate this raw image if refCount > 1. +	LLPointer<LLImageRaw> duplicate(); +  	// Src and dst can be any size.  Src and dst can each have 3 or 4 components.  	void copy( LLImageRaw* src ); diff --git a/indra/llmath/llcamera.cpp b/indra/llmath/llcamera.cpp index 22ba26f99b..c14c117da9 100644 --- a/indra/llmath/llcamera.cpp +++ b/indra/llmath/llcamera.cpp @@ -163,7 +163,7 @@ size_t LLCamera::readFrustumFromBuffer(const char *buffer)  S32 LLCamera::AABBInFrustum(const LLVector4a ¢er, const LLVector4a& radius)   { -	static const LLVector4a scaler[] = { +	const LLVector4a scaler[] = {  		LLVector4a(-1,-1,-1),  		LLVector4a( 1,-1,-1),  		LLVector4a(-1, 1,-1), @@ -207,7 +207,7 @@ S32 LLCamera::AABBInFrustum(const LLVector4a ¢er, const LLVector4a& radius)  S32 LLCamera::AABBInFrustumNoFarClip(const LLVector4a& center, const LLVector4a& radius)   { -	static const LLVector4a scaler[] = { +	const LLVector4a scaler[] = {  		LLVector4a(-1,-1,-1),  		LLVector4a( 1,-1,-1),  		LLVector4a(-1, 1,-1), diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 28ed051c55..5ed05e2201 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -628,25 +628,41 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac  			if (v)  			{  				U32 v_idx = idx[j*stride+v_offset]*3; +				v_idx = llclamp(v_idx, (U32) 0, (U32) v->getCount());  				vert.getPosition().set(v->get(v_idx),  								v->get(v_idx+1),  								v->get(v_idx+2));  			} -			if (n) +			//bounds check n and t lookups because some FBX to DAE converters +			//use negative indices and empty arrays to indicate data does not exist +			//for a particular channel +			if (n && n->getCount() > 0)  			{  				U32 n_idx = idx[j*stride+n_offset]*3; +				n_idx = llclamp(n_idx, (U32) 0, (U32) n->getCount());  				vert.getNormal().set(n->get(n_idx),  								n->get(n_idx+1),  								n->get(n_idx+2));  			} +			else +			{ +				vert.getNormal().clear(); +			} + -			if (t) +			if (t && t->getCount() > 0)  			{  				U32 t_idx = idx[j*stride+t_offset]*2; +				t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount());  				vert.mTexCoord.setVec(t->get(t_idx),  								t->get(t_idx+1));								  			} +			else +			{ +				vert.mTexCoord.clear(); +			} +  			verts.push_back(vert);  		} diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 9e4857b6bc..9d06dd6904 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1132,7 +1132,8 @@ void LLGLManager::initExtensions()  	// Misc  	glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, (GLint*) &mGLMaxVertexRange);  	glGetIntegerv(GL_MAX_ELEMENTS_INDICES, (GLint*) &mGLMaxIndexRange); -	 +	glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*) &mGLMaxTextureSize); +  #if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS  	LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL;  	if (mHasVertexBufferObject) diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index d70e764769..823de9d361 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -147,6 +147,7 @@ public:  	S32 mVRAM; // VRAM in MB  	S32 mGLMaxVertexRange;  	S32 mGLMaxIndexRange; +	S32 mGLMaxTextureSize;  	void getPixelFormat(); // Get the best pixel format diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index c1b96a43da..e35feda2d5 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -109,8 +109,8 @@ void LLRenderTarget::resize(U32 resx, U32 resy, U32 color_fmt)  bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples)  { -	resx = llmin(resx, (U32) 4096); -	resy = llmin(resy, (U32) 4096); +	resx = llmin(resx, (U32) gGLManager.mGLMaxTextureSize); +	resy = llmin(resy, (U32) gGLManager.mGLMaxTextureSize);  	stop_glerror();  	release(); diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 96b7e57e97..307a5561a0 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -315,6 +315,8 @@ extern "C" { int yyerror(const char *fmt, ...); }  "ATTACH_HUD_BOTTOM_LEFT" { count(); yylval.ival = 36; return(INTEGER_CONSTANT); }  "ATTACH_HUD_BOTTOM"		{ count(); yylval.ival = 37; return(INTEGER_CONSTANT); }  "ATTACH_HUD_BOTTOM_RIGHT"	{ count(); yylval.ival = 38; return(INTEGER_CONSTANT); } +"ATTACH_NECK"   { count(); yylval.ival = 39; return(INTEGER_CONSTANT); } +"ATTACH_AVATAR_CENTER"   { count(); yylval.ival = 40; return(INTEGER_CONSTANT); }  "LAND_LEVEL"		{ count(); yylval.ival = E_LANDBRUSH_LEVEL; return(INTEGER_CONSTANT); }  "LAND_RAISE"		{ count(); yylval.ival = E_LANDBRUSH_RAISE; return(INTEGER_CONSTANT); } diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 6120f22ba4..0b346286c8 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -271,7 +271,8 @@ ATTACH_LLLEG		Passed to llAttachToAvatar to attach task to left lower leg  ATTACH_BELLY		Passed to llAttachToAvatar to attach task to belly  ATTACH_LEFT_PEC		Passed to llAttachToAvatar to attach task to left pectoral  ATTACH_RIGHT_PEC	Passed to llAttachToAvatar to attach task to right pectoral - +ATTACH_NECK			Passed to llAttachToAvatar to attach task to neck +ATTACH_AVATAR_CENTER	Passed to llAttachToAvatar to attach task to avatar center  LAND_LEVEL			Passed to llModifyLand to level terrain  LAND_RAISE			Passed to llModifyLand to raise terrain  LAND_LOWER			Passed to llModifyLand to lower terrain diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2e91d10cd3..b302f5c9b9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8128,6 +8128,18 @@      <integer>0</integer>    </map> +  <key>RenderDepthOfFieldInEditMode</key> +  <map> +    <key>Comment</key> +    <string>Whether to use depth of field effect when in edit mode</string> +    <key>Persist</key> +    <integer>1</integer> +    <key>Type</key> +    <string>Boolean</string> +    <key>Value</key> +    <integer>0</integer> +  </map> +    <key>CameraDoFResScale</key>    <map>      <key>Comment</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1000c0e1e8..7331b93810 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4334,11 +4334,6 @@ void LLAppViewer::idle()  				llinfos << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << llendl;  				gObjectList.mNumDeadObjectUpdates = 0;  			} -			if (gObjectList.mNumUnknownKills) -			{ -				llinfos << "Kills on unknown objects: " << gObjectList.mNumUnknownKills << llendl; -				gObjectList.mNumUnknownKills = 0; -			}  			if (gObjectList.mNumUnknownUpdates)  			{  				llinfos << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << llendl; diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 294cecc703..38268b102b 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -134,6 +134,16 @@ void LLDrawPoolAvatar::prerender()  	{  		sBufferUsage = GL_STREAM_DRAW_ARB;  	} + +	if (!mDrawFace.empty()) +	{ +		const LLFace *facep = mDrawFace[0]; +		if (facep && facep->getDrawable()) +		{ +			LLVOAvatar* avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); +			updateRiggedVertexBuffers(avatarp); +		} +	}  }  LLMatrix4& LLDrawPoolAvatar::getModelView() @@ -1250,6 +1260,65 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)  	}  } +void LLDrawPoolAvatar::getRiggedGeometry(LLFace* face, LLPointer<LLVertexBuffer>& buffer, U32 data_mask, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face) +{ +	face->setGeomIndex(0); +	face->setIndicesIndex(0); +		 +	//rigged faces do not batch textures +	face->setTextureIndex(255); + +	if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable()) +	{ //make a new buffer +		if (sShaderLevel > 0) +		{ +			buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB); +		} +		else +		{ +			buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB); +		} +		buffer->allocateBuffer(vol_face.mNumVertices, vol_face.mNumIndices, true); +	} +	else +	{ //resize existing buffer +		buffer->resizeBuffer(vol_face.mNumVertices, vol_face.mNumIndices); +	} + +	face->setSize(vol_face.mNumVertices, vol_face.mNumIndices); +	face->setVertexBuffer(buffer); + +	U16 offset = 0; +		 +	LLMatrix4 mat_vert = skin->mBindShapeMatrix; +	glh::matrix4f m((F32*) mat_vert.mMatrix); +	m = m.inverse().transpose(); +		 +	F32 mat3[] =  +	{ m.m[0], m.m[1], m.m[2], +		m.m[4], m.m[5], m.m[6], +		m.m[8], m.m[9], m.m[10] }; + +	LLMatrix3 mat_normal(mat3);				 + +	//let getGeometryVolume know if alpha should override shiny +	U32 type = gPipeline.getPoolTypeFromTE(face->getTextureEntry(), face->getTexture()); + +	if (type == LLDrawPool::POOL_ALPHA) +	{ +		face->setPoolType(LLDrawPool::POOL_ALPHA); +	} +	else +	{ +		face->setPoolType(LLDrawPool::POOL_AVATAR); +	} + +	//llinfos << "Rebuilt face " << face->getTEOffset() << " of " << face->getDrawable() << " at " << gFrameTimeSeconds << llendl; +	face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true); + +	buffer->flush(); +} +  void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* face, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face)  {  	LLVector4a* weight = vol_face.mWeights; @@ -1269,60 +1338,27 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*  		buffer->getNumIndices() != vol_face.mNumIndices ||  		(drawable && drawable->isState(LLDrawable::REBUILD_ALL)))  	{ -		face->setGeomIndex(0); -		face->setIndicesIndex(0); -		 -		//rigged faces do not batch textures -		face->setTextureIndex(255); - -		if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable()) -		{ //make a new buffer -			if (sShaderLevel > 0) +		if (drawable && drawable->isState(LLDrawable::REBUILD_ALL)) +		{ //rebuild EVERY face in the drawable, not just this one, to avoid missing drawable wide rebuild issues +			for (S32 i = 0; i < drawable->getNumFaces(); ++i)  			{ -				buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB); -			} -			else -			{ -				buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB); +				LLFace* facep = drawable->getFace(i); +				U32 face_data_mask = facep->getRiggedVertexBufferDataMask(); +				if (face_data_mask) +				{ +					LLPointer<LLVertexBuffer> cur_buffer = facep->getVertexBuffer(); +					const LLVolumeFace& cur_vol_face = volume->getVolumeFace(i); +					getRiggedGeometry(facep, cur_buffer, face_data_mask, skin, volume, cur_vol_face); +				}  			} -			buffer->allocateBuffer(vol_face.mNumVertices, vol_face.mNumIndices, true); -		} -		else -		{ //resize existing buffer -			buffer->resizeBuffer(vol_face.mNumVertices, vol_face.mNumIndices); -		} - -		face->setSize(vol_face.mNumVertices, vol_face.mNumIndices); -		face->setVertexBuffer(buffer); - -		U16 offset = 0; -		 -		LLMatrix4 mat_vert = skin->mBindShapeMatrix; -		glh::matrix4f m((F32*) mat_vert.mMatrix); -		m = m.inverse().transpose(); -		 -		F32 mat3[] =  -		{ m.m[0], m.m[1], m.m[2], -		  m.m[4], m.m[5], m.m[6], -		  m.m[8], m.m[9], m.m[10] }; - -		LLMatrix3 mat_normal(mat3);				 - -		//let getGeometryVolume know if alpha should override shiny -		U32 type = gPipeline.getPoolTypeFromTE(face->getTextureEntry(), face->getTexture()); +			drawable->clearState(LLDrawable::REBUILD_ALL); -		if (type == LLDrawPool::POOL_ALPHA) -		{ -			face->setPoolType(LLDrawPool::POOL_ALPHA); +			buffer = face->getVertexBuffer();  		}  		else -		{ -			face->setPoolType(LLDrawPool::POOL_AVATAR); +		{ //just rebuild this face +			getRiggedGeometry(face, buffer, data_mask, skin, volume, vol_face);  		} - -		face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true); - -		buffer->flush();  	}  	if (sShaderLevel <= 0 && face->mLastSkinTime < avatar->getLastSkinTime()) @@ -1407,11 +1443,6 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*  			}  		}  	} - -	if (drawable && (face->getTEOffset() == drawable->getNumFaces()-1)) -	{ -		drawable->clearState(LLDrawable::REBUILD_ALL); -	}  }  void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) @@ -1536,7 +1567,6 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)  void LLDrawPoolAvatar::renderDeferredRiggedSimple(LLVOAvatar* avatar)  { -	updateRiggedVertexBuffers(avatar);  	renderRigged(avatar, RIGGED_DEFERRED_SIMPLE);  } @@ -1600,7 +1630,6 @@ void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)  void LLDrawPoolAvatar::renderRiggedSimple(LLVOAvatar* avatar)  { -	updateRiggedVertexBuffers(avatar);  	renderRigged(avatar, RIGGED_SIMPLE);  } diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index 69e3068858..5551d8f6d8 100644 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -129,6 +129,7 @@ public:  	void endDeferredRiggedSimple();  	void endDeferredRiggedBump(); +	void getRiggedGeometry(LLFace* face, LLPointer<LLVertexBuffer>& buffer, U32 data_mask, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face);  	void updateRiggedFaceVertexBuffer(LLVOAvatar* avatar,  									  LLFace* facep,   									  const LLMeshSkinInfo* skin,  diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index be743d57d2..5f58577a7c 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2116,7 +2116,7 @@ void LLPanelLandOptions::refreshSearch()  	bool can_change =  			LLViewerParcelMgr::isParcelModifiableByAgent( -				parcel, GP_LAND_CHANGE_IDENTITY) +				parcel, GP_LAND_FIND_PLACES)  			&& region  			&& !(region->getRegionFlags() & REGION_FLAGS_BLOCK_PARCEL_SEARCH); diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp index 2b92b0b3d1..a567d1217a 100644 --- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp @@ -92,7 +92,7 @@ void LLMenuOptionPathfindingRebakeNavmesh::initialize()  void LLMenuOptionPathfindingRebakeNavmesh::quit()  { -	if (mIsInitialized) +	if (mIsInitialized)		// Quitting from the login screen leaves this uninitialized  	{  		if (mNavMeshSlot.connected())  		{ diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 305f6fca0f..102b97de30 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1912,10 +1912,10 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis  		h >>= i;  		if(w * h *c > 0) //valid  		{ -			LLPointer<LLImageRaw> newraw = new LLImageRaw(raw->getData(), raw->getWidth(), raw->getHeight(), raw->getComponents()); -			newraw->scale(w, h) ; -			raw = newraw; - +			//make a duplicate to keep the original raw image untouched. +			raw = raw->duplicate(); +			raw->scale(w, h) ; +			  			discardlevel += i ;  		}  	} diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a897eec551..6e02fafd01 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4506,7 +4506,6 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)  		if (id == LLUUID::null)  		{  			LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL; -			gObjectList.mNumUnknownKills++;  			continue;  		}  		else @@ -4530,18 +4529,12 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)  				// Do the kill  				gObjectList.killObject(objectp);  			} -			else -			{ -				LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL; -				gObjectList.mNumUnknownKills++; -			}  		}  		// We should remove the object from selection after it is marked dead by gObjectList to make LLToolGrab,          // which is using the object, release the mouse capture correctly when the object dies.          // See LLToolGrab::handleHoverActive() and LLToolGrab::handleHoverNonPhysical().  		LLSelectMgr::getInstance()->removeObjectFromSelections(id); -  	}  } @@ -7220,8 +7213,12 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)  	LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance();  	if(instance)  	{ -		instance->trackURL( -						   sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); +		llinfos << "Object named " << object_name  +			<< " is offering TP to region " +			<< sim_name << " position " << pos +			<< llendl; + +		instance->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);  		LLFloaterReg::showInstance("world_map", "center");  	} diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 6b9d6bbc68..54f9360b60 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -106,7 +106,6 @@ LLViewerObjectList::LLViewerObjectList()  	mNumNewObjects = 0;  	mWasPaused = FALSE;  	mNumDeadObjectUpdates = 0; -	mNumUnknownKills = 0;  	mNumUnknownUpdates = 0;  } diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 449a4633ff..6518c25d09 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -188,7 +188,6 @@ public:  	S32 mNumUnknownUpdates;  	S32 mNumDeadObjectUpdates; -	S32 mNumUnknownKills;  	S32 mNumDeadObjects;  protected:  	std::vector<U64>	mOrphanParents;	// LocalID/ip,port of orphaned objects diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 08fcb60d03..634ff1392e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1531,7 +1531,12 @@ void LLViewerFetchedTexture::addToCreateTexture()  							destroyRawImage();  							return ;  						} -						mRawImage->scale(w >> i, h >> i) ;					 + +						{ +							//make a duplicate in case somebody else is using this raw image +							mRawImage = mRawImage->duplicate();  +							mRawImage->scale(w >> i, h >> i) ;					 +						}  					}  				}  			} @@ -1764,7 +1769,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()  	else if (pixel_priority < 0.001f && !have_all_data)  	{  		// Not on screen but we might want some data -		if (mBoostLevel > BOOST_HIGH) +		if (mBoostLevel > BOOST_SELECTED)  		{  			// Always want high boosted images  			priority = 1.f; @@ -2899,7 +2904,11 @@ void LLViewerFetchedTexture::setCachedRawImage()  				--i ;  			} -			mRawImage->scale(w >> i, h >> i) ; +			{ +				//make a duplicate in case somebody else is using this raw image +				mRawImage = mRawImage->duplicate();  +				mRawImage->scale(w >> i, h >> i) ; +			}  		}  		mCachedRawImage = mRawImage ;  		mRawDiscardLevel += i ; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 2e7949e9a3..2eaa0ac92d 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -116,9 +116,9 @@ public:  		BOOST_SCULPTED      ,  		BOOST_HIGH 			= 10, -		BOOST_BUMP          , -		BOOST_TERRAIN		, // has to be high priority for minimap / low detail  		BOOST_SELECTED		,		 +		BOOST_BUMP          , +		BOOST_TERRAIN		, // has to be high priority for minimap / low detail		  		BOOST_AVATAR_BAKED_SELF	,  		BOOST_AVATAR_SELF	, // needed for baking avatar  		BOOST_SUPER_HIGH    , //textures higher than this need to be downloaded at the required resolution without delay. diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 48a69129eb..b9243f3fdb 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4247,7 +4247,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei  	F32 scale_factor = 1.0f ;  	if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height))  	{	 -		if ((image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) +		if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) &&  +			(image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)  		{  			if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true))  			{ @@ -4262,6 +4263,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei  					snapshot_height = image_height;  					reset_deferred = true;  					mWorldViewRectRaw.set(0, image_height, image_width, 0); +					LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() ); +					LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );  					scratch_space.bindTarget();  				}  				else @@ -4471,6 +4474,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei  	if (reset_deferred)  	{  		mWorldViewRectRaw = window_rect; +		LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() ); +		LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );  		scratch_space.flush();  		scratch_space.release();  		gPipeline.allocateScreenBuffer(original_width, original_height); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d94cd01a0b..c0f80cf855 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1133,7 +1133,13 @@ void LLVOVolume::sculpt()  		S32 max_discard = mSculptTexture->getMaxDiscardLevel();  		if (discard_level > max_discard) -			discard_level = max_discard;    // clamp to the best we can do +		{ +			discard_level = max_discard;    // clamp to the best we can do			 +		} +		if(discard_level > MAX_DISCARD_LEVEL) +		{ +			return; //we think data is not ready yet. +		}  		S32 current_discard = getVolume()->getSculptLevel() ;  		if(current_discard < -2) @@ -4599,7 +4605,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  			if (is_rigged)  			{ -				drawablep->setState(LLDrawable::RIGGED); +				if (!drawablep->isState(LLDrawable::RIGGED)) +				{ +					drawablep->setState(LLDrawable::RIGGED); + +					//first time this is drawable is being marked as rigged, +					// do another LoD update to use avatar bounding box +					vobj->updateLOD(); +				}  			}  			else  			{ diff --git a/indra/newview/noise.h b/indra/newview/noise.h index 0923bffcf2..b3efad73c5 100644 --- a/indra/newview/noise.h +++ b/indra/newview/noise.h @@ -310,6 +310,8 @@ static void normalize3(F32 v[3])  static void init(void)  { +	// we want repeatable noise (e.g. for stable terrain texturing), so seed with known value +	srand(42);  	int i, j, k;  	for (i = 0 ; i < B ; i++) { @@ -340,6 +342,9 @@ static void init(void)  		for (j = 0 ; j < 3 ; j++)  			g3[B + i][j] = g3[i][j];  	} + +	// reintroduce entropy +	srand(time(NULL));		// Flawfinder: ignore  }  #undef B diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 2051772d63..75f5e16452 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -162,6 +162,7 @@ S32 LLPipeline::RenderGlowIterations;  F32 LLPipeline::RenderGlowWidth;  F32 LLPipeline::RenderGlowStrength;  BOOL LLPipeline::RenderDepthOfField; +BOOL LLPipeline::RenderDepthOfFieldInEditMode;  F32 LLPipeline::CameraFocusTransitionTime;  F32 LLPipeline::CameraFNumber;  F32 LLPipeline::CameraFocalLength; @@ -589,6 +590,7 @@ void LLPipeline::init()  	connectRefreshCachedSettingsSafe("RenderGlowWidth");  	connectRefreshCachedSettingsSafe("RenderGlowStrength");  	connectRefreshCachedSettingsSafe("RenderDepthOfField"); +	connectRefreshCachedSettingsSafe("RenderDepthOfFieldInEditMode");  	connectRefreshCachedSettingsSafe("CameraFocusTransitionTime");  	connectRefreshCachedSettingsSafe("CameraFNumber");  	connectRefreshCachedSettingsSafe("CameraFocalLength"); @@ -1072,6 +1074,7 @@ void LLPipeline::refreshCachedSettings()  	RenderGlowWidth = gSavedSettings.getF32("RenderGlowWidth");  	RenderGlowStrength = gSavedSettings.getF32("RenderGlowStrength");  	RenderDepthOfField = gSavedSettings.getBOOL("RenderDepthOfField"); +	RenderDepthOfFieldInEditMode = gSavedSettings.getBOOL("RenderDepthOfFieldInEditMode");  	CameraFocusTransitionTime = gSavedSettings.getF32("CameraFocusTransitionTime");  	CameraFNumber = gSavedSettings.getF32("CameraFNumber");  	CameraFocalLength = gSavedSettings.getF32("CameraFocalLength"); @@ -7132,7 +7135,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)  	{  		bool dof_enabled = !LLViewerCamera::getInstance()->cameraUnderWater() && -							!LLToolMgr::getInstance()->inBuildMode() && +			(RenderDepthOfFieldInEditMode || !LLToolMgr::getInstance()->inBuildMode()) &&  							RenderDepthOfField; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 36abeca295..9e113289fc 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -857,6 +857,7 @@ public:  	static F32 RenderGlowWidth;  	static F32 RenderGlowStrength;  	static BOOL RenderDepthOfField; +	static BOOL RenderDepthOfFieldInEditMode;  	static F32 CameraFocusTransitionTime;  	static F32 CameraFNumber;  	static F32 CameraFocalLength; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 849f3ef73d..15ca3434fe 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -47,7 +47,7 @@          Better      </text>      <icon -     color="0.12 0.12 0.12 1" +     color="DkGray"       height="14"       image_name="Rounded_Square"       layout="topleft" @@ -56,16 +56,15 @@       top_delta="-2"       width="2" />    <icon -     color="0.12 0.12 0.12 1" +     color="DkGray"       height="14"       image_name="Rounded_Square"       layout="topleft"       left_pad="41" -     name="LowMidraphicsDivet" -     top_delta="-2" +     name="LowMidGraphicsDivet"       width="2" />      <icon -     color="0.12 0.12 0.12 1" +     color="DkGray"       height="14"       image_name="Rounded_Square"       layout="topleft" @@ -74,7 +73,7 @@       top_delta="0"       width="2" />    <icon -     color="0.12 0.12 0.12 1" +     color="DkGray"       height="14"       image_name="Rounded_Square"       layout="topleft" @@ -83,7 +82,7 @@       top_delta="0"       width="2" />      <icon -     color="0.12 0.12 0.12 1" +     color="DkGray"       height="14"       image_name="Rounded_Square"       layout="topleft" @@ -92,7 +91,7 @@       top_delta="0"       width="2" />    <icon -     color="0.12 0.12 0.12 1" +     color="DkGray"       height="14"       image_name="Rounded_Square"       layout="topleft" @@ -101,7 +100,7 @@       top_delta="0"       width="2" />      <icon -     color="0.12 0.12 0.12 1" +     color="DkGray"       height="14"       image_name="Rounded_Square"       layout="topleft" @@ -147,7 +146,7 @@       height="12"       layout="topleft"       left_delta="87" -     name="ShadersPrefText3" +     name="ShadersPrefText2"       top_delta="0"       width="80">          Mid diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml index 89aef57cca..0eeccbeac5 100644 --- a/indra/newview/skins/default/xui/en/role_actions.xml +++ b/indra/newview/skins/default/xui/en/role_actions.xml @@ -70,8 +70,8 @@  		     longdescription="Toggle 'Show Place in Search' and setting a parcel's category in About Land > Options tab."  		     name="land find places" value="17" />  		<action -		     description="Change parcel name, description, and 'Show Place in Search' settings" -		     longdescription="Change parcel name, description, and 'Show Place in Search' settings. This is done in About Land > Options tab." +		     description="Change parcel name, description, and 'Moderate Content' settings" +		     longdescription="Change parcel name, description, and 'Moderate Content' settings. This is done in About Land > Options tab."  		     name="land change identity" value="18" />  		<action description="Set landing point and set teleport routing"  		     longdescription="On a group-owned parcel, Members in a Role with this Ability can set a landing point to specify where incoming teleports arrive, and also set teleport routing for further control. This is done in About Land > Options tab." diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 4383b98592..0f4424a7f9 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2508,6 +2508,8 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale  	<string name="ATTACH_HUD_BOTTOM_LEFT">HUD Bottom Left</string>  	<string name="ATTACH_HUD_BOTTOM">HUD Bottom</string>  	<string name="ATTACH_HUD_BOTTOM_RIGHT">HUD Bottom Right</string> +	<string name="ATTACH_NECK">Neck</string> +	<string name="ATTACH_AVATAR_CENTER">Avatar Center</string>  	<!-- script editor -->  	<string name="CursorPos">Line [LINE], Column [COLUMN]</string> | 
