diff options
| -rw-r--r-- | NORSPEC-207.patch | 164 | ||||
| -rwxr-xr-x | indra/llcommon/llapp.cpp | 6 | ||||
| -rwxr-xr-x | indra/llcommon/llcoros.cpp | 4 | ||||
| -rwxr-xr-x | indra/llcommon/llerrorthread.cpp | 2 | ||||
| -rwxr-xr-x | indra/llcommon/llsys.cpp | 6 | ||||
| -rwxr-xr-x | indra/llmessage/llurlrequest.cpp | 10 | ||||
| -rwxr-xr-x | indra/media_plugins/winmmshim/winmm_shim.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llpanelface.cpp | 2 | ||||
| -rwxr-xr-x | indra/viewer_components/login/lllogin.cpp | 36 | 
9 files changed, 197 insertions, 35 deletions
| diff --git a/NORSPEC-207.patch b/NORSPEC-207.patch new file mode 100644 index 0000000000..a1c1447bda --- /dev/null +++ b/NORSPEC-207.patch @@ -0,0 +1,164 @@ +diff -r fe4bab01522e indra/llprimitive/llrendermaterialtable.cpp +--- a/indra/llprimitive/llrendermaterialtable.cpp	Wed May 15 17:57:21 2013 +0000 ++++ b/indra/llprimitive/llrendermaterialtable.cpp	Wed May 22 14:23:04 2013 -0700 +@@ -184,6 +184,44 @@ + 	} + } +  ++// 'v' is an integer value for 100ths of radians (don't ask...) ++// ++void LLRenderMaterialEntry::LLRenderMaterial::setSpecularMapRotation(S32 v) const ++{ ++	// Store the fact that we're using the new rotation rep ++	// ++	m_flags |= kNewSpecularMapRotation; ++ ++	// Store 'sign bit' in our m_flags ++	// ++	m_flags &= ~kSpecularMapRotationNegative; ++	m_flags |= (specularMapRotation < 0) ? kSpecularMapRotationNegative : 0; ++ ++	specularRotation = abs(specularRotation); ++	specularRotation = llmin(specularRotation, MAX_MATERIAL_MAP_ROTATION); ++ ++	m_specularRotation = (U16)(abs(specularMapRotation)); ++} ++ ++// 'v' is an integer value for 100ths of radians (don't ask...) ++// ++void LLRenderMaterialEntry::LLRenderMaterial::setNormalMapRotation(S32 v) const ++{ ++ ++	// Store the fact that we're using the new rep for this material ++	// ++	m_flags |= kNewNormalMapRotation; ++ ++	// Store 'sign bit' in our m_flags ++	// ++	m_flags &= ~kNormalMapRotationNegative; ++	m_flags |= (normalMapRotation < 0) ? kNormalMapRotationNegative : 0; ++ ++	normalRotation = abs(normalRotation); ++	normalRotation = llmin(normalRotation, MAX_MATERIAL_MAP_ROTATION); ++ ++	m_normalRotation = (U16)(abs(normalMapRotation)); ++} +  + void LLRenderMaterialEntry::LLRenderMaterial::asLLSD( LLSD& dest ) const + { +@@ -193,20 +231,45 @@ + 	dest["NormOffsetY"] = (S32)m_normalOffsetY; + 	dest["NormRepeatX"] = m_normalRepeatX; + 	dest["NormRepeatY"] = m_normalRepeatY; +-	dest["NormRotation"] = (S32)m_normalRotation; ++ ++	S32 value = (S32)m_normalMapRotation; ++ ++	// If we don't have the flag for new rotations set, ++	// then we need to convert it now ++	if (!(m_flags & kNewNormalMapRotation)) ++	{ ++		F32 old_radians = ((F32)m_normalMapRotation / 10000.0f) ++		S32 new_val	    = (S32)(old_radians * 100.0f); ++		setNormalMapRotation(new_Val); ++	} ++ ++	dest["NormRotation"] = (m_flags & kNormalMapRotationNegative) ? -(S32)m_normalRotation : (S32)m_normalRotation; +  + 	dest["SpecOffsetX"] = (S32)m_specularOffsetX; + 	dest["SpecOffsetY"] = (S32)m_specularOffsetY; + 	dest["SpecRepeatX"] = m_specularRepeatX; + 	dest["SpecRepeatY"] = m_specularRepeatY; +-	dest["SpecRotation"] = (S32)m_specularRotation; ++ ++ ++	value = (S32)m_specularRotation; ++ ++	// If we don't have the flag for new rotations set, ++	// then we need to convert it now ++	if (!(m_flags & kNewSpecularMapRotation)) ++	{ ++		F32 old_radians = ((F32)m_specularMapRotation / 10000.0f) ++		S32 new_val	    = (S32)(old_radians * 100.0f); ++		setSpecularMapRotation(new_Val); ++	} ++ ++	dest["SpecRotation"] = (m_flags & kSpecularMapRotationNegative) ? -(S32)m_specularRotation : (S32)m_specularRotation; +  + 	dest["SpecMap"] = m_specularMap; + 	dest["SpecColor"] = m_specularLightColor.getValue(); + 	dest["SpecExp"] = (S32)m_specularLightExponent; + 	dest["EnvIntensity"] = (S32)m_environmentIntensity; + 	dest["AlphaMaskCutoff"] = (S32)m_alphaMaskCutoff; +-	dest["DiffuseAlphaMode"] = (S32)m_diffuseAlphaMode; ++	dest["DiffuseAlphaMode"] = (S32)(m_diffuseAlphaMode & 0xF); + 	 + } +  +@@ -217,7 +280,10 @@ + 	m_normalOffsetY = (U16)materialDefinition["NormOffsetY"].asInteger(); + 	m_normalRepeatX = materialDefinition["NormRepeatX"].asInteger(); + 	m_normalRepeatY = materialDefinition["NormRepeatY"].asInteger(); +-	m_normalRotation = (U16)materialDefinition["NormRotation"].asInteger(); ++ ++	S32 normalRotation = materialDefinition["NormRotation"].asInteger(); ++ ++	setNormalMapRotation(normalRotation); +  + 	m_specularMap = materialDefinition["SpecMap"].asUUID(); +  +@@ -225,7 +291,10 @@ + 	m_specularOffsetY = (U16)materialDefinition["SpecOffsetY"].asInteger(); + 	m_specularRepeatX = materialDefinition["SpecRepeatX"].asInteger(); + 	m_specularRepeatY = materialDefinition["SpecRepeatY"].asInteger(); +-	m_specularRotation = (U16)materialDefinition["SpecRotation"].asInteger(); ++ ++	S32 specularRotation = materialDefinition["SpecRotation"].asInteger(); ++ ++	setSpecularMapRotation(specularRotation); +  + 	m_specularLightColor.setValue( materialDefinition["SpecColor"] ); + 	m_specularLightExponent = (U8)materialDefinition["SpecExp"].asInteger(); +diff -r fe4bab01522e indra/llprimitive/llrendermaterialtable.h +--- a/indra/llprimitive/llrendermaterialtable.h	Wed May 15 17:57:21 2013 +0000 ++++ b/indra/llprimitive/llrendermaterialtable.h	Wed May 22 14:23:04 2013 -0700 +@@ -89,11 +89,17 @@ +  + 	void computeID(); +  ++ + 	struct LLRenderMaterial + 	{ + 		void asLLSD( LLSD& dest ) const; + 		void setFromLLSD( const LLSD& materialDefinition ); +  ++		void setNormalMapRotation(S32 v); ++		void setSpecularMapRotation(S32 v); ++ ++		const S32 MAX_MATERIAL_MAP_ROTATION = 62800; ++ + 		// 36 bytes + 		LLUUID m_normalMap; + 		LLUUID m_specularMap; +@@ -119,7 +125,20 @@ + 		U8 m_specularLightExponent; + 		U8 m_environmentIntensity; + 		U8 m_alphaMaskCutoff; +-		U8 m_diffuseAlphaMode; ++		U8 m_diffuseAlphaMode : 4; ++		U8 m_flags            : 4; ++	}; ++ ++	// Flags stored in LLRenderMaterial::m_flags to differentiate 'old' rotation format ++	// which doesn't handle negative or large rotations correctly from new format. ++	// All ancient materials will have these flags unset as the values for diffuseAlphaMode ++	// from which the bits were stolen never used more than the bottom 2 bits. ++	// ++	enum RenderMaterialFlags { ++	 kNewNormalMapRotation 		= 0x1, ++	 kNewSpecularMapRotation 	= 0x2, ++	 kNormalMapRotationNegative 	= 0x4, ++	 kSpecularMapRotationNegative   = 0x8 + 	}; +  + 	friend struct eastl::hash<LLRenderMaterial>; diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index b66fc82250..67a98d5fb8 100755 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -378,7 +378,7 @@ void LLApp::startErrorThread()  	//  	if(!mThreadErrorp)  	{ -//		llinfos << "Starting error thread" << llendl; +		llinfos << "Starting error thread" << llendl;  		mThreadErrorp = new LLErrorThread();  		mThreadErrorp->setUserData((void *) this);  		mThreadErrorp->start(); @@ -986,9 +986,9 @@ bool windows_post_minidump_callback(const wchar_t* dump_path,  	}  	llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; -    // *NOTE:Mani - this code is stolen from LLApp, where its never actually used. +   // *NOTE:Mani - this code is stolen from LLApp, where its never actually used.  	//OSMessageBox("Attach Debugger Now", "Error", OSMB_OK); -    // *TODO: Translate the signals/exceptions into cross-platform stuff +   // *TODO: Translate the signals/exceptions into cross-platform stuff  	// Windows implementation  	llinfos << "Entering Windows Exception Handler..." << llendl; diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index a629f71d4b..baaddcaed1 100755 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -60,7 +60,7 @@ bool LLCoros::cleanup(const LLSD&)          // since last tick?          if (mi->second->exited())          { -            LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL; +			   LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL;              // The erase() call will invalidate its passed iterator value --              // so increment mi FIRST -- but pass its original value to              // erase(). This is what postincrement is all about. @@ -94,7 +94,7 @@ std::string LLCoros::generateDistinctName(const std::string& prefix) const      {          if (mCoros.find(name) == mCoros.end())          { -            LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL; +			   LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL;              return name;          }      } diff --git a/indra/llcommon/llerrorthread.cpp b/indra/llcommon/llerrorthread.cpp index 4a0c8ef342..950fcd6e83 100755 --- a/indra/llcommon/llerrorthread.cpp +++ b/indra/llcommon/llerrorthread.cpp @@ -106,7 +106,7 @@ void LLErrorThread::run()  	// This thread sits and waits for the sole purpose  	// of waiting for the signal/exception handlers to flag the  	// application state as APP_STATUS_ERROR. -	//llinfos << "thread_error - Waiting for an error" << llendl; +	llinfos << "thread_error - Waiting for an error" << llendl;  	S32 counter = 0;  #if !LL_WINDOWS diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index b8e8125e68..57a6de9060 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -1032,9 +1032,9 @@ LLMemoryInfo& LLMemoryInfo::refresh()  {  	mStatsMap = loadStatsMap(); -//	LL_DEBUGS("LLMemoryInfo") << "Populated mStatsMap:\n"; -//	LLSDSerialize::toPrettyXML(mStatsMap, LL_CONT); -//	LL_ENDL; +	LL_DEBUGS("LLMemoryInfo") << "Populated mStatsMap:\n"; +	LLSDSerialize::toPrettyXML(mStatsMap, LL_CONT); +	LL_ENDL;  	return *this;  } diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 627d591839..de9e2fe294 100755 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -314,11 +314,11 @@ LLIOPipe::EStatus LLURLRequest::process_impl(  		 const F32 TIMEOUT_ADJUSTMENT = 2.0f;  		 mDetail->mByteAccumulator = 0;  		 pump->adjustTimeoutSeconds(TIMEOUT_ADJUSTMENT); -		 lldebugs << "LLURLRequest adjustTimeoutSeconds for request: " << mDetail->mURL << llendl; -		 if (mState == STATE_INITIALIZED) -		 { -			  llinfos << "LLURLRequest adjustTimeoutSeconds called during upload" << llendl; -		 } +		lldebugs << "LLURLRequest adjustTimeoutSeconds for request: " << mDetail->mURL << llendl; +		if (mState == STATE_INITIALIZED) +		{ +			llinfos << "LLURLRequest adjustTimeoutSeconds called during upload" << llendl; +		}  	}  	switch(mState) diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp index 47a1e5c018..aac349bf57 100755 --- a/indra/media_plugins/winmmshim/winmm_shim.cpp +++ b/indra/media_plugins/winmmshim/winmm_shim.cpp @@ -56,7 +56,7 @@ void ll_winmm_shim_initialize(){  		// grab winmm.dll from system path, where it should live  		wsprintf(dll_path, "%s\\winmm.dll", system_path);  		HMODULE winmm_handle = ::LoadLibrary(dll_path); -		 +  		if (winmm_handle != NULL)  		{	// we have a dll, let's get out pointers!  			initialized = true; diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index dcedbba81b..01ed6e84b8 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -2387,8 +2387,6 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)  {  	LLPanelFace* self = (LLPanelFace*) userdata; -	gFocusMgr.setKeyboardFocus( NULL ); -  	LLUICtrl* repeats_ctrl = self->getChild<LLUICtrl>("rptctrl");  	F32 repeats_per_meter = repeats_ctrl->getValue().asReal(); diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 3357ad812d..8f33b2ad58 100755 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -137,7 +137,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para  	//{  	//	printable_params["params"]["passwd"] = "*******";  	//} -    LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) +	LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self)                          << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL;  	// Arriving in SRVRequest state @@ -146,23 +146,23 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para      LLSD rewrittenURIs;      { -        LLEventTimeout filter(replyPump); -        sendProgressEvent("offline", "srvrequest"); +		LLEventTimeout filter(replyPump); +		sendProgressEvent("offline", "srvrequest"); -        // Request SRV record. -        LL_DEBUGS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL; +      // Request SRV record. +		LL_DEBUGS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL; -        // *NOTE:Mani - Completely arbitrary default timeout value for SRV request. +      // *NOTE:Mani - Completely arbitrary default timeout value for SRV request.  		F32 seconds_to_timeout = 5.0f;  		if(login_params.has("cfg_srv_timeout"))  		{  			seconds_to_timeout = login_params["cfg_srv_timeout"].asReal();  		} -        // If the SRV request times out (e.g. EXT-3934), simulate response: an -        // array containing our original URI. -        LLSD fakeResponse(LLSD::emptyArray()); -        fakeResponse.append(uri); +		// If the SRV request times out (e.g. EXT-3934), simulate response: an +		// array containing our original URI. +		LLSD fakeResponse(LLSD::emptyArray()); +		fakeResponse.append(uri);  		filter.eventAfter(seconds_to_timeout, fakeResponse);  		std::string srv_pump_name = "LLAres"; @@ -172,13 +172,13 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para  		}  		// Make request -        LLSD request; -        request["op"] = "rewriteURI"; -        request["uri"] = uri; -        request["reply"] = replyPump.getName(); -        rewrittenURIs = postAndWait(self, request, srv_pump_name, filter); -        // EXP-772: If rewrittenURIs fail, try original URI as a fallback. -        rewrittenURIs.append(uri); +		LLSD request; +		request["op"] = "rewriteURI"; +		request["uri"] = uri; +		request["reply"] = replyPump.getName(); +		rewrittenURIs = postAndWait(self, request, srv_pump_name, filter); +		// EXP-772: If rewrittenURIs fail, try original URI as a fallback. +		rewrittenURIs.append(uri);      } // we no longer need the filter      LLEventPump& xmlrpcPump(LLEventPumps::instance().obtain("LLXMLRPCTransaction")); @@ -230,7 +230,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para                  // Still Downloading -- send progress update.                  sendProgressEvent("offline", "downloading");              } -				  +	  			LL_DEBUGS("LLLogin") << "Auth Response: " << mAuthResponse << LL_ENDL;              status = mAuthResponse["status"].asString(); | 
