diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 3744e689565806c7fec7f5e56c7fac81b7bcccaf..e725bdd9fae7d2fa4b6ffbfcbaf38edcffd6b937 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -26,7 +26,7 @@
 #ifndef LLMEMORY_H
 #define LLMEMORY_H
 
-#include "llmemtype.h"
+#include "linden_common.h"
 
 class LLMutex ;
 
diff --git a/indra/llcommon/llmutex.cpp b/indra/llcommon/llmutex.cpp
index 2ce14b3a2e757629b9193bdcdefd903f80d5bea8..e6beb9e680341243ea30b89ddcf2337e95378ae5 100644
--- a/indra/llcommon/llmutex.cpp
+++ b/indra/llcommon/llmutex.cpp
@@ -86,7 +86,7 @@ void LLMutex::lock()
 #if LL_DARWIN
 	mLockingThread = LLThread::currentID();
 #else
-	mLockingThread = LLThread::sThreadIndex;
+	mLockingThread = LLThread::sThreadID;
 #endif
 }
 
@@ -129,7 +129,7 @@ bool LLMutex::isSelfLocked()
 #if LL_DARWIN
 	return mLockingThread == LLThread::currentID();
 #else
-	return mLockingThread == LLThread::sThreadIndex;
+	return mLockingThread == LLThread::sThreadID;
 #endif
 }
 
@@ -181,49 +181,4 @@ void LLCondition::broadcast()
 }
 
 
-//============================================================================
-
-//----------------------------------------------------------------------------
-
-//static
-LLMutex* LLThreadSafeRefCount::sMutex = 0;
-
-//static
-void LLThreadSafeRefCount::initThreadSafeRefCount()
-{
-	if (!sMutex)
-	{
-		sMutex = new LLMutex(0);
-	}
-}
-
-//static
-void LLThreadSafeRefCount::cleanupThreadSafeRefCount()
-{
-	delete sMutex;
-	sMutex = NULL;
-}
-
-
-//----------------------------------------------------------------------------
-
-LLThreadSafeRefCount::LLThreadSafeRefCount() :
-mRef(0)
-{
-}
-
-LLThreadSafeRefCount::~LLThreadSafeRefCount()
-{ 
-	if (mRef != 0)
-	{
-		llerrs << "deleting non-zero reference" << llendl;
-	}
-}
-
-//============================================================================
-
-LLResponder::~LLResponder()
-{
-}
-
 //============================================================================
diff --git a/indra/llcommon/llmutex.h b/indra/llcommon/llmutex.h
index bd0a59b577a5cd8ca7933e39ceccd38dae0dd8cb..cbde4c47a966ad017626fcd5e59dc0e399de7db3 100644
--- a/indra/llcommon/llmutex.h
+++ b/indra/llcommon/llmutex.h
@@ -98,71 +98,4 @@ class LLMutexLock
 	LLMutex* mMutex;
 };
 
-
-//============================================================================
-
-// see llmemory.h for LLPointer<> definition
-
-class LL_COMMON_API LLThreadSafeRefCount
-{
-public:
-	static void initThreadSafeRefCount(); // creates sMutex
-	static void cleanupThreadSafeRefCount(); // destroys sMutex
-
-private:
-	static LLMutex* sMutex;
-
-private:
-	LLThreadSafeRefCount(const LLThreadSafeRefCount&); // not implemented
-	LLThreadSafeRefCount&operator=(const LLThreadSafeRefCount&); // not implemented
-
-protected:
-	virtual ~LLThreadSafeRefCount(); // use unref()
-
-public:
-	LLThreadSafeRefCount();
-
-	void ref()
-	{
-		if (sMutex) sMutex->lock();
-		mRef++; 
-		if (sMutex) sMutex->unlock();
-	} 
-
-	S32 unref()
-	{
-		llassert(mRef >= 1);
-		if (sMutex) sMutex->lock();
-		S32 res = --mRef;
-		if (sMutex) sMutex->unlock();
-		if (0 == res) 
-		{
-			delete this; 
-			return 0;
-		}
-		return res;
-	}	
-	S32 getNumRefs() const
-	{
-		return mRef;
-	}
-
-private: 
-	S32	mRef; 
-};
-
-
-//============================================================================
-
-// Simple responder for self destructing callbacks
-// Pure virtual class
-class LL_COMMON_API LLResponder : public LLThreadSafeRefCount
-{
-protected:
-	virtual ~LLResponder();
-public:
-	virtual void completed(bool success) = 0;
-};
-
-
 #endif // LL_LLTHREAD_H
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 1c86eb4f06a0a558383a3a58b5caea4db8bf33f3..8ce739bf23350d49829536d948a9e560860902ad 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -62,7 +62,7 @@
 #if LL_DARWIN
 // statically allocated thread local storage not supported in Darwin executable formats
 #elif LL_WINDOWS
-U32 __declspec(thread) LLThread::sThreadIndex = 0;
+U32 __declspec(thread) LLThread::sThreadID = 0;
 #elif LL_LINUX
 U32 __thread LLThread::sThreadID = 0;
 #endif 
@@ -96,7 +96,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
 	LLTrace::ThreadRecorder* thread_recorder = new LLTrace::SlaveThreadRecorder();
 
 #if !LL_DARWIN
-	sThreadIndex = threadp->mID;
+	sThreadID = threadp->mID;
 #endif
 
 	// Run the user supplied function
@@ -327,155 +327,6 @@ void LLThread::wakeLocked()
 
 //============================================================================
 
-LLMutex::LLMutex(apr_pool_t *poolp) :
-	mAPRMutexp(NULL), mCount(0), mLockingThread(NO_THREAD)
-{
-	//if (poolp)
-	//{
-	//	mIsLocalPool = FALSE;
-	//	mAPRPoolp = poolp;
-	//}
-	//else
-	{
-		mIsLocalPool = TRUE;
-		apr_pool_create(&mAPRPoolp, NULL); // Create a subpool for this thread
-	}
-	apr_thread_mutex_create(&mAPRMutexp, APR_THREAD_MUTEX_UNNESTED, mAPRPoolp);
-}
-
-
-LLMutex::~LLMutex()
-{
-#if MUTEX_DEBUG
-	//bad assertion, the subclass LLSignal might be "locked", and that's OK
-	//llassert_always(!isLocked()); // better not be locked!
-#endif
-	apr_thread_mutex_destroy(mAPRMutexp);
-	mAPRMutexp = NULL;
-	if (mIsLocalPool)
-	{
-		apr_pool_destroy(mAPRPoolp);
-	}
-}
-
-
-void LLMutex::lock()
-{
-	if(isSelfLocked())
-	{ //redundant lock
-		mCount++;
-		return;
-	}
-	
-	apr_thread_mutex_lock(mAPRMutexp);
-	
-#if MUTEX_DEBUG
-	// Have to have the lock before we can access the debug info
-	U32 id = LLThread::currentID();
-	if (mIsLocked[id] != FALSE)
-		llerrs << "Already locked in Thread: " << id << llendl;
-	mIsLocked[id] = TRUE;
-#endif
-
-#if LL_DARWIN
-	mLockingThread = LLThread::currentID();
-#else
-	mLockingThread = sThreadID;
-#endif
-}
-
-void LLMutex::unlock()
-{
-	if (mCount > 0)
-	{ //not the root unlock
-		mCount--;
-		return;
-	}
-	
-#if MUTEX_DEBUG
-	// Access the debug info while we have the lock
-	U32 id = LLThread::currentID();
-	if (mIsLocked[id] != TRUE)
-		llerrs << "Not locked in Thread: " << id << llendl;	
-	mIsLocked[id] = FALSE;
-#endif
-
-	mLockingThread = NO_THREAD;
-	apr_thread_mutex_unlock(mAPRMutexp);
-}
-
-bool LLMutex::isLocked()
-{
-	apr_status_t status = apr_thread_mutex_trylock(mAPRMutexp);
-	if (APR_STATUS_IS_EBUSY(status))
-	{
-		return true;
-	}
-	else
-	{
-		apr_thread_mutex_unlock(mAPRMutexp);
-		return false;
-	}
-}
-
-bool LLMutex::isSelfLocked()
-{
-#if LL_DARWIN
-	return mLockingThread == LLThread::currentID();
-#else
-	return mLockingThread == sThreadID;
-#endif
-}
-
-U32 LLMutex::lockingThread() const
-{
-	return mLockingThread;
-}
-
-//============================================================================
-
-LLCondition::LLCondition(apr_pool_t *poolp) :
-	LLMutex(poolp)
-{
-	// base class (LLMutex) has already ensured that mAPRPoolp is set up.
-
-	apr_thread_cond_create(&mAPRCondp, mAPRPoolp);
-}
-
-
-LLCondition::~LLCondition()
-{
-	apr_thread_cond_destroy(mAPRCondp);
-	mAPRCondp = NULL;
-}
-
-
-void LLCondition::wait()
-{
-	if (!isLocked())
-	{ //mAPRMutexp MUST be locked before calling apr_thread_cond_wait
-		apr_thread_mutex_lock(mAPRMutexp);
-#if MUTEX_DEBUG
-		// avoid asserts on destruction in non-release builds
-		U32 id = LLThread::currentID();
-		mIsLocked[id] = TRUE;
-#endif
-	}
-	apr_thread_cond_wait(mAPRCondp, mAPRMutexp);
-}
-
-void LLCondition::signal()
-{
-	apr_thread_cond_signal(mAPRCondp);
-}
-
-void LLCondition::broadcast()
-{
-	apr_thread_cond_broadcast(mAPRCondp);
-}
-
-//============================================================================
-
 //----------------------------------------------------------------------------
 
 //static
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index 94b6b6d682e789b2307d92550c0ed30563f34d97..75222c83f9c914dba36ae45350471472e40af0ef 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -42,7 +42,7 @@ class LL_COMMON_API LLThread
 #if LL_DARWIN
 	// statically allocated thread local storage not supported in Darwin executable formats
 #elif LL_WINDOWS
-	static U32 __declspec(thread) LLThread::sThreadIndex;
+	static U32 __declspec(thread) LLThread::sThreadID;
 #elif LL_LINUX
 	static U32 __thread LLThread::sThreadID ;
 #endif
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h
index 1fe492fdce43c10432b6d3345d9cf3a1734f0fcb..53570779fc9662f3f1889658ff5b592ae4483ff6 100644
--- a/indra/llcommon/llunit.h
+++ b/indra/llcommon/llunit.h
@@ -109,9 +109,9 @@ struct LLUnit
 		return mValue;
 	}
 
-	template<typename NEW_UNIT_TYPE> LLUnit<NEW_UNIT_TYPE, STORAGE_TYPE> as()
+	template<typename NEW_UNIT_TYPE, typename NEW_STORAGE_TYPE> LLUnit<NEW_UNIT_TYPE, NEW_STORAGE_TYPE> as()
 	{
-		return LLUnit<NEW_UNIT_TYPE, STORAGE_TYPE>(*this);
+		return LLUnit<NEW_UNIT_TYPE, NEW_STORAGE_TYPE>(*this);
 	}
 
 	void operator += (storage_t value)
@@ -332,21 +332,27 @@ struct HighestPrecisionType<LLUnit<UNIT_TYPE, STORAGE_TYPE> >
 	typedef typename HighestPrecisionType<STORAGE_TYPE>::type_t type_t;
 };
 
-#define LL_DECLARE_DERIVED_UNIT(base_unit_name, unit_name, conversion_factor)                                                                                   \
-struct unit_name                                                                                                                                                \
-{                                                                                                                                                               \
-	typedef base_unit_name base_unit_t;                                                                                                                         \
-};                                                                                                                                                              \
-template<typename STORAGE_TYPE>                                                                                                                                 \
-struct ConversionFactor<unit_name, base_unit_name, STORAGE_TYPE>                                                                                                \
-{                                                                                                                                                               \
-	static typename HighestPrecisionType<STORAGE_TYPE>::type_t get() { return typename HighestPrecisionType<STORAGE_TYPE>::type_t(conversion_factor); }         \
-};                                                                                                                                                              \
-	                                                                                                                                                            \
-template<typename STORAGE_TYPE>                                                                                                                                 \
-struct ConversionFactor<base_unit_name, unit_name, STORAGE_TYPE>						                                                                        \
-{                                                                                                                                                               \
-	static typename HighestPrecisionType<STORAGE_TYPE>::type_t get() { return typename HighestPrecisionType<STORAGE_TYPE>::type_t(1.0 / (conversion_factor)); } \
+#define LL_DECLARE_DERIVED_UNIT(base_unit_name, unit_name, conversion_factor)                   \
+struct unit_name                                                                                \
+{                                                                                               \
+	typedef base_unit_name base_unit_t;                                                         \
+};                                                                                              \
+template<typename STORAGE_TYPE>                                                                 \
+struct ConversionFactor<unit_name, base_unit_name, STORAGE_TYPE>                                \
+{                                                                                               \
+	static typename HighestPrecisionType<STORAGE_TYPE>::type_t get()                            \
+	{                                                                                           \
+		return typename HighestPrecisionType<STORAGE_TYPE>::type_t(conversion_factor);          \
+	}                                                                                           \
+};                                                                                              \
+	                                                                                            \
+template<typename STORAGE_TYPE>                                                                 \
+struct ConversionFactor<base_unit_name, unit_name, STORAGE_TYPE>						        \
+{                                                                                               \
+	static typename HighestPrecisionType<STORAGE_TYPE>::type_t get()                            \
+	{                                                                                           \
+		return typename HighestPrecisionType<STORAGE_TYPE>::type_t(1.0 / (conversion_factor));  \
+	}                                                                                           \
 }
 
 struct Bytes { typedef Bytes base_unit_t; };
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 02c8d2b86f090f5150bdd8574338ceb3d0d1f6f6..54b67832eaf099d4c0c9ff818636cbb1238f161b 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -6667,6 +6667,10 @@ void LLVolumeFace::resizeVertices(S32 num_verts)
 		mPositions = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
 		ll_assert_aligned(mPositions, 16);
 		mNormals = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
+		if ( ((int)mNormals & 0xF) != 0 )
+		{
+			__debugbreak();
+		}
 		ll_assert_aligned(mNormals, 16);
 
 		//pad texture coordinate block end to allow for QWORD reads
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 2a07b5ed705775c557adb74d9b838f5272f574bf..5e8189caa5f9ff1c11d6c8e049eac016bfff8162 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -371,17 +371,10 @@ NVIDIA GTX 690M							.*NVIDIA .*GTX *69*M.*					5	1	0	0
 NVIDIA G100								.*NVIDIA .*G10.*						3	1	1	4.2
 NVIDIA GT 120							.*NVIDIA .*GT *12.*						2	1	0	0
 NVIDIA GT 130							.*NVIDIA .*GT *13.*						2	1	0	0
-NVIDIA GT 140							.*NVIDIA .*GT *140.*					2	1	0	0
-NVIDIA GT 150							.*NVIDIA .*GT *150.*					2	1	0	0
-NVIDIA GT 160							.*NVIDIA .*GT *160.*					2	1	0	0
 NVIDIA GTS 150							.*NVIDIA .*GTS *15.*					2	1	0	0
 NVIDIA 205								.*NVIDIA .*GeForce 205.*				2	1	1	3.3
 NVIDIA 210								.*NVIDIA .*GeForce 210.*				3	1	1	3.3
 NVIDIA GT 220							.*NVIDIA .*GT *22.*						2	1	1	3.3
-NVIDIA GT 230							.*NVIDIA .*GT *230.*					2	1	1	3.3
-NVIDIA GT 240							.*NVIDIA .*GT *240.*					2	1	1	3.3
-NVIDIA GT 250							.*NVIDIA .*GT *250.*					2	1	1	3.3
-NVIDIA GT 260							.*NVIDIA .*GT *260.*					2	1	1	3.3
 NVIDIA GTS 240							.*NVIDIA .*GTS *24.*					4	1	1	3.3
 NVIDIA GTS 250							.*NVIDIA .*GTS *25.*					4	1	1	3.3
 NVIDIA GTX 260							.*NVIDIA .*GTX *26.*					4	1	1	3.3
@@ -394,11 +387,9 @@ NVIDIA GT 320							.*NVIDIA .*GT *32.*						3	1	0	0
 NVIDIA GT 330							.*NVIDIA .*GT *33.*						3	1	0	0
 NVIDIA GT 340							.*NVIDIA .*GT *34.*						3	1	0	0
 NVIDIA 405								.*NVIDIA .* 405.*						3	1	0	0
-NVIDIA GT 415							.*NVIDIA .*GT *415.*					3	1	1	4.2
 NVIDIA GT 420							.*NVIDIA .*GT *42.*						3	1	1	4.2
 NVIDIA GT 430							.*NVIDIA .*GT *43.*						3	1	1	4.1
 NVIDIA GT 440							.*NVIDIA .*GT *44.*						4	1	0	0
-NVIDIA GT 450							.*NVIDIA .*GT *45.*						4	1	0	0
 NVIDIA GTS 450							.*NVIDIA .*GTS *45.*					4	1	1	4.2
 NVIDIA GTX 460							.*NVIDIA .*GTX *46.*					5	1	1	4.2
 NVIDIA GTX 470							.*NVIDIA .*GTX *47.*					5	1	1	4.2
@@ -407,7 +398,6 @@ NVIDIA 510								.*NVIDIA .* 510.*						3	1	0	0
 NVIDIA GT 520							.*NVIDIA .*GT *52.*						3	1	1	4.2
 NVIDIA GT 530							.*NVIDIA .*GT *53.*						3	1	1	4.2
 NVIDIA GT 540							.*NVIDIA .*GT *54.*						3	1	1	4.2
-NVIDIA GT 550							.*NVIDIA .*GT *55.*						3	1	1	4.2
 NVIDIA GTX 550							.*NVIDIA .*GTX *55.*					5	1	1	4.2
 NVIDIA GTX 560							.*NVIDIA .*GTX *56.*					5	1	1	4.2
 NVIDIA GTX 570							.*NVIDIA .*GTX *57.*					5	1	1	4.2
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 885292131f2bc021cd690cc5abbf0a2db37f4c50..9f1c7855be9c96f09e3558134c7e2e835806a0a8 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -2280,7 +2280,7 @@ void LLTextureFetchWorker::recordTextureStart(bool is_http)
 	{
 		mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp();
 	}
-	LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE,
+	LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE,
 												 is_http,
 												 LLImageBase::TYPE_AVATAR_BAKE == mType);
 }
@@ -2291,13 +2291,13 @@ void LLTextureFetchWorker::recordTextureDone(bool is_http)
 {
 	if (mMetricsStartTime)
 	{
-		LLViewerAssetStatsFF::record_response_thread1(LLViewerAssetType::AT_TEXTURE,
+		LLViewerAssetStatsFF::record_response(LLViewerAssetType::AT_TEXTURE,
 													  is_http,
 													  LLImageBase::TYPE_AVATAR_BAKE == mType,
 													  LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime);
 		mMetricsStartTime = 0;
 	}
-	LLViewerAssetStatsFF::record_dequeue_thread1(LLViewerAssetType::AT_TEXTURE,
+	LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE,
 												 is_http,
 												 LLImageBase::TYPE_AVATAR_BAKE == mType);
 }
@@ -2826,9 +2826,9 @@ S32 LLTextureFetch::update(F32 max_time_ms)
 
 	{
 		mNetworkQueueMutex.lock();										// +Mfnq
-	mMaxBandwidth = band_width ;
+		mMaxBandwidth = band_width ;
 
-		gTextureList.sTextureBits += mHTTPTextureBits;
+		LLStatViewer::TEXTURE_KBIT.add(mHTTPTextureBits);
 		mHTTPTextureBits = 0;
 
 		mNetworkQueueMutex.unlock();									// -Mfnq
@@ -3702,7 +3702,7 @@ AssetReportHandler stats_handler;
 bool
 TFReqSetRegion::doWork(LLTextureFetch *)
 {
-	LLViewerAssetStatsFF::set_region_thread1(mRegionHandle);
+	LLViewerAssetStatsFF::set_region(mRegionHandle);
 
 	return true;
 }
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 90d0c7e04b4837b72119f0f7aad67686d2ef0f65..2c1e7502e57e70ad06379e77659e50822c133afd 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -329,7 +329,7 @@ class LLTextureFetch : public LLWorkerThread
 	LLTextureInfo mTextureInfo;
 
 	// XXX possible delete
-	U32 mHTTPTextureBits;												// Mfnq
+	LLUnit<LLUnits::Bits, U32> mHTTPTextureBits;												// Mfnq
 
 	// XXX possible delete
 	//debug use
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 5331bb03cbeef21beaa6b422a35694b2dede4e44..1d54e50bb90cc5f8f80b6dab4a5ab94c6b13dac0 100755
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -514,8 +514,8 @@ void LLGLTexMemBar::draw()
 	F32 cache_max_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ;
 	S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
 	S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f);
-	F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024);
-	F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024);
+	LLUnit<LLUnits::Bytes, F32> total_texture_downloaded = gTotalTextureData;
+	LLUnit<LLUnits::Bytes, F32> total_object_downloaded = gTotalObjectData;
 	U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests() ;
 	//----------------------------------------------------------------------------
 	LLGLSUIDefault gls_ui;