diff --git a/.hgtags b/.hgtags
index 9148b257272a0b1b1f882ec266b325a7c2c1f0ad..dbddc4905e9a27f6d17a357ac4b664e3b364f4b4 100644
--- a/.hgtags
+++ b/.hgtags
@@ -150,6 +150,7 @@ a9abb9633a266c8d2fe62411cfd1c86d32da72bf 2.7.1-release
 09984bfa6cae17e0f72d02b75c1b7393c65eecfc 2.7.5-beta1
 e1ed60913230dd64269a7f7fc52cbc6004f6d52c 2.8.0-start
 502f6a5deca9365ddae57db4f1e30172668e171e 2.8.1-start
+c04e68e1b0034fd0a20815ae24c77e5f8428e822 DRTVWR-188
 888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
 2a3965b3ad202df7ea25d2be689291bb14a1280e DRTVWR-155
 6866d9df6efbd441c66451debd376d21211de39c DRTVWR-68_2.7.5-release
@@ -350,4 +351,6 @@ ab2ffc547c8a8950ff187c4f6c95e5334fab597b 3.3.4-beta5
 28e100d0379a2b0710c57647a28fc5239d3d7b99 3.3.4-release
 a8b3eca451a9eaab59987efb0ab1c4217e3f2dcc DRTVWR-182
 1f27cdfdc54246484f8afbbe42ce48e954175cbd 3.4.0-beta1
+81f6b745ef27f5915fd07f988fdec9944f2bb73e DRTVWR-186
+cc953f00956be52cc64c30637bbeec310eea603f DRTVWR-181
 9ee9387789701d597130f879d9011a4958753862 DRTVWR-189
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index 0745696ef3e70d801725e7609dfe86e701e2c1c7..0da83720bd57d8f3bd15c75a066aab291a70e223 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -62,6 +62,7 @@ enum LAND_STAT_FLAGS
 	STAT_FILTER_BY_PARCEL	= 0x00000001,
 	STAT_FILTER_BY_OWNER	= 0x00000002,
 	STAT_FILTER_BY_OBJECT	= 0x00000004,
+	STAT_FILTER_BY_PARCEL_NAME	= 0x00000008,
 	STAT_REQUEST_LAST_ENTRY	= 0x80000000,
 };
 
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index 99983a19cb8925843453489259c8bda126660aab..9a6d1eff5c2fc1fb1c144d33fbec63f78649231c 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -35,7 +35,7 @@
 #include <boost/shared_ptr.hpp>
 
 #include "llerror.h"
-#include "lltypeinfolookup.h"
+#include "llstl.h"
 
 namespace LLInitParam
 {
@@ -212,14 +212,6 @@ namespace LLInitParam
 
 	public:
 		
-		struct CompareTypeID
-		{
-			bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
-			{
-				return lhs->before(*rhs);
-			}
-		};
-
 		typedef std::vector<std::pair<std::string, bool> >					name_stack_t;
 		typedef std::pair<name_stack_t::iterator, name_stack_t::iterator>	name_stack_range_t;
 		typedef std::vector<std::string>									possible_values_t;
@@ -228,9 +220,9 @@ namespace LLInitParam
 		typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&);
 		typedef boost::function<void (name_stack_t&, S32, S32, const possible_values_t*)>	parser_inspect_func_t;
 
-		typedef LLTypeInfoLookup<parser_read_func_t>		parser_read_func_map_t;
-		typedef LLTypeInfoLookup<parser_write_func_t>		parser_write_func_map_t;
-		typedef LLTypeInfoLookup<parser_inspect_func_t>		parser_inspect_func_map_t;
+		typedef std::map<const std::type_info*, parser_read_func_t>		parser_read_func_map_t;
+		typedef std::map<const std::type_info*, parser_write_func_t>	parser_write_func_map_t;
+		typedef std::map<const std::type_info*, parser_inspect_func_t>	parser_inspect_func_map_t;
 
 		Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map)
 		:	mParseSilently(false),
diff --git a/indra/llcommon/llregistry.h b/indra/llcommon/llregistry.h
index 36d7f7a44c89617b6f34c0a11698eb6b06367a54..853c427a13e87dfaeb5a209c2d755fa0d31aa3f4 100644
--- a/indra/llcommon/llregistry.h
+++ b/indra/llcommon/llregistry.h
@@ -31,30 +31,16 @@
 
 #include <boost/type_traits.hpp>
 #include "llsingleton.h"
-#include "lltypeinfolookup.h"
+#include "llstl.h"
 
 template <typename T>
-class LLRegistryDefaultComparator
+struct LLRegistryDefaultComparator
 {
-	bool operator()(const T& lhs, const T& rhs) { return lhs < rhs; }
-};
-
-template <typename KEY, typename VALUE>
-struct LLRegistryMapSelector
-{
-    typedef std::map<KEY, VALUE> type;
-};
-
-template <typename VALUE>
-struct LLRegistryMapSelector<std::type_info*, VALUE>
-{
-    typedef LLTypeInfoLookup<VALUE> type;
-};
-
-template <typename VALUE>
-struct LLRegistryMapSelector<const std::type_info*, VALUE>
-{
-    typedef LLTypeInfoLookup<VALUE> type;
+	bool operator()(const T& lhs, const T& rhs) const
+	{
+		using std::less;
+		return less<T>()(lhs, rhs);
+	}
 };
 
 template <typename KEY, typename VALUE, typename COMPARATOR = LLRegistryDefaultComparator<KEY> >
@@ -72,7 +58,7 @@ class LLRegistry
 	{
 		friend class LLRegistry<KEY, VALUE, COMPARATOR>;
 	public:
-		typedef typename LLRegistryMapSelector<KEY, VALUE>::type registry_map_t;
+		typedef std::map<KEY, VALUE, COMPARATOR> registry_map_t;
 
 		bool add(ref_const_key_t key, ref_const_value_t value)
 		{
diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h
index 8ad12c9a03c29c8f08e4a7cc60589f5a11f69a41..d3941e1bc92c30502b0a05989ab4da896d776db5 100644
--- a/indra/llcommon/llstl.h
+++ b/indra/llcommon/llstl.h
@@ -33,6 +33,7 @@
 #include <vector>
 #include <set>
 #include <deque>
+#include <typeinfo>
 
 // Use to compare the first element only of a pair
 // e.g. typedef std::set<std::pair<int, Data*>, compare_pair<int, Data*> > some_pair_set_t; 
@@ -470,4 +471,54 @@ llbind2nd(const _Operation& __oper, const _Tp& __x)
   return llbinder2nd<_Operation>(__oper, _Arg2_type(__x));
 }
 
+/**
+ * Compare std::type_info* pointers a la std::less. We break this out as a
+ * separate function for use in two different std::less specializations.
+ */
+inline
+bool before(const std::type_info* lhs, const std::type_info* rhs)
+{
+#if LL_LINUX && defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
+    // If we're building on Linux with gcc, and it's either gcc 3.x or
+    // 4.{0,1,2,3}, then we have to use a workaround. Note that we use gcc on
+    // Mac too, and some people build with gcc on Windows (cygwin or mingw).
+    // On Linux, different load modules may produce different type_info*
+    // pointers for the same type. Have to compare name strings to get good
+    // results.
+    return strcmp(lhs->name(), rhs->name()) < 0;
+#else  // not Linux, or gcc 4.4+
+    // Just use before(), as we normally would
+    return lhs->before(*rhs);
+#endif
+}
+
+/**
+ * Specialize std::less<std::type_info*> to use std::type_info::before().
+ * See MAINT-1175. It is NEVER a good idea to directly compare std::type_info*
+ * because, on Linux, you might get different std::type_info* pointers for the
+ * same type (from different load modules)!
+ */
+namespace std
+{
+	template <>
+	struct less<const std::type_info*>:
+		public std::binary_function<const std::type_info*, const std::type_info*, bool>
+	{
+		bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
+		{
+			return before(lhs, rhs);
+		}
+	};
+
+	template <>
+	struct less<std::type_info*>:
+		public std::binary_function<std::type_info*, std::type_info*, bool>
+	{
+		bool operator()(std::type_info* lhs, std::type_info* rhs) const
+		{
+			return before(lhs, rhs);
+		}
+	};
+} // std
+
 #endif // LL_LLSTL_H
diff --git a/indra/llcommon/lltypeinfolookup.h b/indra/llcommon/lltypeinfolookup.h
index 7510cc12ed7d473a96e97bf58633fd6c8bd4eeba..0b6862444ee76811b42d1c6383c223df04dcf414 100644
--- a/indra/llcommon/lltypeinfolookup.h
+++ b/indra/llcommon/lltypeinfolookup.h
@@ -12,9 +12,49 @@
 #if ! defined(LL_LLTYPEINFOLOOKUP_H)
 #define LL_LLTYPEINFOLOOKUP_H
 
-#include "llsortedvector.h"
+#include <boost/unordered_map.hpp>
+#include <boost/functional/hash.hpp>
+#include <boost/optional.hpp>
+#include <functional>               // std::binary_function
 #include <typeinfo>
 
+/**
+ * The following helper classes are based on the Boost.Unordered documentation:
+ * http://www.boost.org/doc/libs/1_45_0/doc/html/unordered/hash_equality.html
+ */
+
+/**
+ * Compute hash for a string passed as const char*
+ */
+struct const_char_star_hash: public std::unary_function<const char*, std::size_t>
+{
+    std::size_t operator()(const char* str) const
+    {
+        std::size_t seed = 0;
+        for ( ; *str; ++str)
+        {
+            boost::hash_combine(seed, *str);
+        }
+        return seed;
+    }
+};
+
+/**
+ * Compute equality for strings passed as const char*
+ *
+ * I (nat) suspect that this is where the default behavior breaks for the
+ * const char* values returned from std::type_info::name(). If you compare the
+ * two const char* pointer values, as a naive, unspecialized implementation
+ * will surely do, they'll compare unequal.
+ */
+struct const_char_star_equal: public std::binary_function<const char*, const char*, bool>
+{
+    bool operator()(const char* lhs, const char* rhs) const
+    {
+        return strcmp(lhs, rhs) == 0;
+    }
+};
+
 /**
  * LLTypeInfoLookup is specifically designed for use cases for which you might
  * consider std::map<std::type_info*, VALUE>. We have several such data
@@ -23,88 +63,55 @@
  * different load modules will produce different std::type_info*.
  * LLTypeInfoLookup contains a workaround to address this issue.
  *
- * Specifically, when we don't find the passed std::type_info*,
- * LLTypeInfoLookup performs a linear search over registered entries to
- * compare name() strings. Presuming that this succeeds, we cache the new
- * (previously unrecognized) std::type_info* to speed future lookups.
- *
- * This worst-case fallback search (linear search with string comparison)
- * should only happen the first time we look up a given type from a particular
- * load module other than the one from which we initially registered types.
- * (However, a lookup which wouldn't succeed anyway will always have
- * worst-case performance.) This class is probably best used with less than a
- * few dozen different types.
+ * The API deliberately diverges from std::map in several respects:
+ * * It avoids iterators, not only begin()/end() but also as return values
+ *   from insert() and find(). This bypasses transform_iterator overhead.
+ * * Since we literally use compile-time types as keys, the essential insert()
+ *   and find() methods accept the key type as a @em template parameter,
+ *   accepting and returning value_type as a normal runtime value. This is to
+ *   permit future optimization (e.g. compile-time type hashing) without
+ *   changing the API.
  */
 template <typename VALUE>
 class LLTypeInfoLookup
 {
+    // Use this for our underlying implementation: lookup by
+    // std::type_info::name() string. This is one of the rare cases in which I
+    // dare use const char* directly, rather than std::string, because I'm
+    // sure that every value returned by std::type_info::name() is static.
+    // HOWEVER, specify our own hash + equality functors: naively comparing
+    // distinct const char* values won't work.
+    typedef boost::unordered_map<const char*, VALUE,
+                                 const_char_star_hash, const_char_star_equal> impl_map_type;
+
 public:
-    typedef LLTypeInfoLookup<VALUE> self;
-    typedef LLSortedVector<const std::type_info*, VALUE> vector_type;
-    typedef typename vector_type::key_type key_type;
-    typedef typename vector_type::mapped_type mapped_type;
-    typedef typename vector_type::value_type value_type;
-    typedef typename vector_type::iterator iterator;
-    typedef typename vector_type::const_iterator const_iterator;
+    typedef VALUE value_type;
 
     LLTypeInfoLookup() {}
 
-    iterator begin() { return mVector.begin(); }
-    iterator end()   { return mVector.end(); }
-    const_iterator begin() const { return mVector.begin(); }
-    const_iterator end()   const { return mVector.end(); }
-    bool empty() const { return mVector.empty(); }
-    std::size_t size() const { return mVector.size(); }
-
-    std::pair<iterator, bool> insert(const std::type_info* key, const VALUE& value)
-    {
-        return insert(value_type(key, value));
-    }
-
-    std::pair<iterator, bool> insert(const value_type& pair)
-    {
-        return mVector.insert(pair);
-    }
+    bool empty() const { return mMap.empty(); }
+    std::size_t size() const { return mMap.size(); }
 
-    // const find() forwards to non-const find(): this can alter mVector!
-    const_iterator find(const std::type_info* key) const
+    template <typename KEY>
+    bool insert(const value_type& value)
     {
-        return const_cast<self*>(this)->find(key);
+        // Obtain and store the std::type_info::name() string as the key.
+        // Return just the bool from std::map::insert()'s return pair.
+        return mMap.insert(typename impl_map_type::value_type(typeid(KEY).name(), value)).second;
     }
 
-    // non-const find() caches previously-unknown type_info* to speed future
-    // lookups.
-    iterator find(const std::type_info* key)
+    template <typename KEY>
+    boost::optional<value_type> find() const
     {
-        iterator found = mVector.find(key);
-        if (found != mVector.end())
-        {
-            // If LLSortedVector::find() found, great, we're done.
-            return found;
-        }
-        // Here we didn't find the passed type_info*. On Linux, though, even
-        // for the same type, typeid(sametype) produces a different type_info*
-        // when used in different load modules. So the fact that we didn't
-        // find the type_info* we seek doesn't mean this type isn't
-        // registered. Scan for matching name() string.
-        for (typename vector_type::iterator ti(mVector.begin()), tend(mVector.end());
-             ti != tend; ++ti)
-        {
-            if (std::string(ti->first->name()) == key->name())
-            {
-                // This unrecognized 'key' is for the same type as ti->first.
-                // To speed future lookups, insert a new entry that lets us
-                // look up ti->second using this same 'key'.
-                return insert(key, ti->second).first;
-            }
-        }
-        // We simply have never seen a type with this type_info* from any load
-        // module.
-        return mVector.end();
+        // Use the std::type_info::name() string as the key.
+        typename impl_map_type::const_iterator found = mMap.find(typeid(KEY).name());
+        if (found == mMap.end())
+            return boost::optional<value_type>();
+        return found->second;
     }
 
 private:
-    vector_type mVector;
+    impl_map_type mMap;
 };
 
 #endif /* ! defined(LL_LLTYPEINFOLOOKUP_H) */
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 203868190574e6de33f8ecf9c309647fe4e90c39..bcc661a920465ebc73b42fd1dad40c3875162ecd 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -29,7 +29,7 @@
 
 const S32 LL_VERSION_MAJOR = 3;
 const S32 LL_VERSION_MINOR = 4;
-const S32 LL_VERSION_PATCH = 0;
+const S32 LL_VERSION_PATCH = 1;
 const S32 LL_VERSION_BUILD = 0;
 
 const char * const LL_CHANNEL = "Second Life Developer";
diff --git a/indra/llrender/llglstates.h b/indra/llrender/llglstates.h
index e26aead676fe6520cb0256a501387bd37c62c1d4..0e2c3bcb44b6abbb70c1de85fe9e1930c19789e3 100644
--- a/indra/llrender/llglstates.h
+++ b/indra/llrender/llglstates.h
@@ -59,7 +59,6 @@ class LLGLSDefault
 	LLGLEnable mColorMaterial;
 	LLGLDisable mAlphaTest, mBlend, mCullFace, mDither, mFog, 
 		mLineSmooth, mLineStipple, mNormalize, mPolygonSmooth,
-		mTextureGenQ, mTextureGenR, mTextureGenS, mTextureGenT,
 		mGLMultisample;
 public:
 	LLGLSDefault()
@@ -76,10 +75,6 @@ class LLGLSDefault
 		mLineStipple(GL_LINE_STIPPLE),
 		mNormalize(GL_NORMALIZE),
 		mPolygonSmooth(GL_POLYGON_SMOOTH),
-		mTextureGenQ(GL_TEXTURE_GEN_Q), 
-		mTextureGenR(GL_TEXTURE_GEN_R),
-		mTextureGenS(GL_TEXTURE_GEN_S), 
-		mTextureGenT(GL_TEXTURE_GEN_T),
 		mGLMultisample(GL_MULTISAMPLE_ARB)
 	{ }
 };
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 348c1eb1b7ab5b2076c8b75afa768d0afbc1f0a0..4597d0626065b40af486b541f45390dd4090f62c 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -648,7 +648,7 @@ void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eT
 		gGL.flush();
 		glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB);
 	}
-
+	
 	// We want an early out, because this function does a LOT of stuff.
 	if ( ( (isAlpha && (mCurrAlphaOp == op) && (mCurrAlphaSrc1 == src1) && (mCurrAlphaSrc2 == src2))
 			|| (!isAlpha && (mCurrColorOp == op) && (mCurrColorSrc1 == src1) && (mCurrColorSrc2 == src2)) ) && !gGL.mDirty)
@@ -1437,6 +1437,17 @@ void LLRender::matrixMode(U32 mode)
 	mMatrixMode = mode;
 }
 
+U32 LLRender::getMatrixMode()
+{
+	if (mMatrixMode >= MM_TEXTURE0 && mMatrixMode <= MM_TEXTURE3)
+	{ //always return MM_TEXTURE if current matrix mode points at any texture matrix
+		return MM_TEXTURE;
+	}
+
+	return mMatrixMode;
+}
+
+
 void LLRender::loadIdentity()
 {
 	flush();
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index fa5f7f311df89eff6dedd88ffb801f7f6f9c5474..78a310e525fbe8e8494d0d22f325e347ae367b3f 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -346,6 +346,7 @@ class LLRender
 	void loadIdentity();
 	void multMatrix(const GLfloat* m);
 	void matrixMode(U32 mode);	
+	U32 getMatrixMode();
 
 	const glh::matrix4f& getModelviewMatrix();
 	const glh::matrix4f& getProjectionMatrix();
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index a9248d4d738d1f9d66452acd80c4ebc03b12f5d9..b6a9a6b653a28c37b69929713fe65046913815c5 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -643,7 +643,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
 		text[count++] = strdup("#define textureCube texture\n");
 		text[count++] = strdup("#define texture2DLod textureLod\n");
 		text[count++] = strdup("#define	shadow2D(a,b) vec2(texture(a,b))\n");
-
+		
 		if (major_version > 1 || minor_version >= 40)
 		{ //GLSL 1.40 replaces texture2DRect et al with texture
 			text[count++] = strdup("#define texture2DRect texture\n");
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index eadef93c890f871634b8ee1061d560f2d19c2f7e..28a14b23b916dc7d6619c6704edf4b55b6710e41 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -291,6 +291,7 @@ void LLVBOPool::seedPool()
 
 
 
+
 void LLVBOPool::cleanup()
 {
 	U32 size = LL_VBO_BLOCK_SIZE;
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 802914e25be4c9f3b707bde5841279ae3d255b9b..b3499693dd15433b7450dd6f9ed17252f68f1618 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -2720,6 +2720,11 @@ BOOL LLScrollListCtrl::hasSortOrder() const
 	return !mSortColumns.empty();
 }
 
+void LLScrollListCtrl::clearSortOrder()
+{
+	mSortColumns.clear();
+}
+
 void LLScrollListCtrl::clearColumns()
 {
 	column_map_t::iterator itor;
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 44d96358381b046a21af7d6d1800fb50dc15cc6f..e83794e173130f6ec145adf8617595aad9f81969 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -374,6 +374,7 @@ class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler,
 	std::string     getSortColumnName();
 	BOOL			getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; }
 	BOOL			hasSortOrder() const;
+	void			clearSortOrder();
 
 	S32		selectMultiple( uuid_vec_t ids );
 	// conceptually const, but mutates mItemList
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index d612ad5005d19afebbbdbbc15d92e008396e92ad..4e54354731e57fe76ef1afa9981cadc4e3ab4bc5 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -31,18 +31,10 @@
 #include "llinitparam.h"
 #include "llregistry.h"
 #include "llxuiparser.h"
+#include "llstl.h"
 
 class LLView;
 
-// sort functor for typeid maps
-struct LLCompareTypeID
-{
-	bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
-	{
-		return lhs->before(*rhs);
-	}
-};
-
 // lookup widget constructor funcs by widget name
 template <typename DERIVED_TYPE>
 class LLChildRegistry : public LLRegistrySingleton<std::string, LLWidgetCreatorFunc, DERIVED_TYPE>
@@ -71,14 +63,14 @@ class LLDefaultChildRegistry : public LLChildRegistry<LLDefaultChildRegistry>
 
 // lookup widget name by type
 class LLWidgetNameRegistry 
-:	public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry , LLCompareTypeID>
+:	public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry>
 {};
 
 // lookup function for generating empty param block by widget type
 // this is used for schema generation
 //typedef const LLInitParam::BaseBlock& (*empty_param_block_func_t)();
 //class LLDefaultParamBlockRegistry
-//:	public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry, LLCompareTypeID>
+//:	public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry>
 //{};
 
 extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP;
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2af71d98b8d1a456e69e9fe1b9df2eaab536d27e..9e2c529eb3b260989d5769df396ba841388ef44d 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8090,7 +8090,7 @@
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <real>0</real>
+    <real>-0.007</real>
   </map>
   <key>RenderShadowOffsetError</key>
   <map>
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 8db4cb58cff03bf1a2788945ff622fea7c650269..12706f130bd479e25c9facadf566577a99f5209e 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -34,10 +34,10 @@ out vec4 frag_color;
 VARYING vec4 vertex_color;
 VARYING vec2 vary_texcoord0;
 
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
 uniform sampler2DRect depthMap;
 
 uniform mat4 shadow_matrix[6];
@@ -58,22 +58,22 @@ uniform float shadow_bias;
 
 uniform mat4 inv_proj;
 
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
 {
 	stc.xyz /= stc.w;
 	stc.z += shadow_bias;
-
-	stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
+		
+	stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
 	
-	float cs = shadow2DRect(shadowMap, stc.xyz).x;
+	float cs = shadow2D(shadowMap, stc.xyz).x;
 	float shadow = cs;
-
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
-                        
-        return shadow*0.2;
+	
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+                       
+    return shadow*0.2;
 }
 
 
@@ -99,8 +99,7 @@ void main()
 		if (spos.z < near_split.z)
 		{
 			lpos = shadow_matrix[3]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
 			shadow += pcfShadow(shadowMap3, lpos)*w;
@@ -111,8 +110,7 @@ void main()
 		if (spos.z < near_split.y && spos.z > far_split.z)
 		{
 			lpos = shadow_matrix[2]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
 			w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -123,8 +121,7 @@ void main()
 		if (spos.z < near_split.x && spos.z > far_split.y)
 		{
 			lpos = shadow_matrix[1]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
 			w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@@ -135,8 +132,7 @@ void main()
 		if (spos.z > far_split.x)
 		{
 			lpos = shadow_matrix[0]*spos;
-			lpos.xy *= shadow_res;
-				
+							
 			float w = 1.0;
 			w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
 				
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
index 33958a501016ad83e07cc5bb1fa762019919d84d..228dc104ac05c2b8fa7774328d388b55652d383b 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
@@ -31,17 +31,16 @@ out vec4 frag_color;
 #define frag_color gl_FragColor
 #endif
 
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
 uniform sampler2DRect depthMap;
 uniform sampler2D diffuseMap;
 
 uniform mat4 shadow_matrix[6];
 uniform vec4 shadow_clip;
 uniform vec2 screen_res;
-uniform vec2 shadow_res;
 
 vec3 atmosLighting(vec3 light);
 vec3 scaleSoftClip(vec3 light);
@@ -54,6 +53,7 @@ VARYING vec3 vary_pointlight_col;
 VARYING vec2 vary_texcoord0;
 VARYING vec4 vertex_color;
 
+uniform vec2 shadow_res;
 uniform float shadow_bias;
 
 uniform mat4 inv_proj;
@@ -71,22 +71,22 @@ vec4 getPosition(vec2 pos_screen)
 	return pos;
 }
 
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
 {
 	stc.xyz /= stc.w;
 	stc.z += shadow_bias;
 
-	stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
+	stc.x = floor(stc.x*shadow_res.x + fract(stc.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
 	
-	float cs = shadow2DRect(shadowMap, stc.xyz).x;
+	float cs = shadow2D(shadowMap, stc.xyz).x;
 	float shadow = cs;
-
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
+	
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
                         
-        return shadow*0.2;
+    return shadow*0.2;
 }
 
 
@@ -112,8 +112,7 @@ void main()
 		if (spos.z < near_split.z)
 		{
 			lpos = shadow_matrix[3]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
 			shadow += pcfShadow(shadowMap3, lpos)*w;
@@ -124,8 +123,7 @@ void main()
 		if (spos.z < near_split.y && spos.z > far_split.z)
 		{
 			lpos = shadow_matrix[2]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
 			w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -136,8 +134,7 @@ void main()
 		if (spos.z < near_split.x && spos.z > far_split.y)
 		{
 			lpos = shadow_matrix[1]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
 			w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@@ -148,8 +145,7 @@ void main()
 		if (spos.z > far_split.x)
 		{
 			lpos = shadow_matrix[0]*spos;
-			lpos.xy *= shadow_res;
-				
+							
 			float w = 1.0;
 			w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
 				
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
index 2093fc37dc3330a24b9971ce0718805de407444c..c3950a10e17ef8e3d3ee0e6472a724d3c1486de2 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
@@ -33,17 +33,16 @@ out vec4 frag_color;
 
 uniform float minimum_alpha;
 
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
 uniform sampler2DRect depthMap;
 uniform sampler2D diffuseMap;
 
 uniform mat4 shadow_matrix[6];
 uniform vec4 shadow_clip;
 uniform vec2 screen_res;
-uniform vec2 shadow_res;
 
 vec3 atmosLighting(vec3 light);
 vec3 scaleSoftClip(vec3 light);
@@ -55,6 +54,8 @@ VARYING vec3 vary_position;
 VARYING vec3 vary_pointlight_col;
 VARYING vec2 vary_texcoord0;
 
+uniform vec2 shadow_res;
+
 uniform float shadow_bias;
 
 uniform mat4 inv_proj;
@@ -72,20 +73,20 @@ vec4 getPosition(vec2 pos_screen)
 	return pos;
 }
 
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
 {
 	stc.xyz /= stc.w;
 	stc.z += shadow_bias;
 
-	stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
+	stc.x = floor(stc.x*shadow_res.x + fract(stc.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
+	float cs = shadow2D(shadowMap, stc.xyz).x;
 	
-	float cs = shadow2DRect(shadowMap, stc.xyz).x;
 	float shadow = cs;
 
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
+        shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+        shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+        shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+        shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
                         
         return shadow*0.2;
 }
@@ -120,8 +121,7 @@ void main()
 		if (spos.z < near_split.z)
 		{
 			lpos = shadow_matrix[3]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
 			shadow += pcfShadow(shadowMap3, lpos)*w;
@@ -132,8 +132,7 @@ void main()
 		if (spos.z < near_split.y && spos.z > far_split.z)
 		{
 			lpos = shadow_matrix[2]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
 			w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -144,8 +143,7 @@ void main()
 		if (spos.z < near_split.x && spos.z > far_split.y)
 		{
 			lpos = shadow_matrix[1]*spos;
-			lpos.xy *= shadow_res;
-
+			
 			float w = 1.0;
 			w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
 			w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@@ -156,8 +154,7 @@ void main()
 		if (spos.z > far_split.x)
 		{
 			lpos = shadow_matrix[0]*spos;
-			lpos.xy *= shadow_res;
-				
+							
 			float w = 1.0;
 			w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
 				
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index db3d7603591eedd0d0a52f62b54170380a71fc5a..c1495b145e10709f47c5a42c2aa05b64d3f25d0d 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -35,10 +35,10 @@ out vec4 frag_color;
 
 uniform sampler2DRect depthMap;
 uniform sampler2DRect normalMap;
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
 uniform sampler2DShadow shadowMap4;
 uniform sampler2DShadow shadowMap5;
 
@@ -55,10 +55,10 @@ VARYING vec2 vary_fragcoord;
 
 uniform mat4 inv_proj;
 uniform vec2 screen_res;
-uniform vec2 shadow_res;
 uniform vec2 proj_shadow_res;
 uniform vec3 sun_dir;
 
+uniform vec2 shadow_res;
 uniform float shadow_bias;
 uniform float shadow_offset;
 
@@ -78,30 +78,31 @@ vec4 getPosition(vec2 pos_screen)
 	return pos;
 }
 
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
 {
 	stc.xyz /= stc.w;
-	stc.z += shadow_bias*scl;
+	stc.z += shadow_bias;
 
-	stc.x = floor(stc.x + fract(pos_screen.y*0.666666666)); // add some jitter to X sample pos according to Y to disguise the snapping going on here
+	stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; // add some jitter to X sample pos according to Y to disguise the snapping going on here
+	float cs = shadow2D(shadowMap, stc.xyz).x;
 
-	float cs = shadow2DRect(shadowMap, stc.xyz).x;
 	float shadow = cs;
 
-	shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
-	shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
-	shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, 1.5, 0.0)).x;
-	shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, -1.5, 0.0)).x;
+	shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+	shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+	shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+	shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+
 			
-        return shadow*0.2;
+    return shadow*0.2;
 }
 
-float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
+float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
 {
 	stc.xyz /= stc.w;
 	stc.z += spot_shadow_bias*scl;
 	stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap
-	
+
 	float cs = shadow2D(shadowMap, stc.xyz).x;
 	float shadow = cs;
 
@@ -162,8 +163,7 @@ void main()
 			if (spos.z < near_split.z)
 			{
 				lpos = shadow_matrix[3]*spos;
-				lpos.xy *= shadow_res;
-
+				
 				float w = 1.0;
 				w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
 				shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w;
@@ -174,8 +174,7 @@ void main()
 			if (spos.z < near_split.y && spos.z > far_split.z)
 			{
 				lpos = shadow_matrix[2]*spos;
-				lpos.xy *= shadow_res;
-
+				
 				float w = 1.0;
 				w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
 				w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -186,7 +185,6 @@ void main()
 			if (spos.z < near_split.x && spos.z > far_split.y)
 			{
 				lpos = shadow_matrix[1]*spos;
-				lpos.xy *= shadow_res;
 
 				float w = 1.0;
 				w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
@@ -198,7 +196,6 @@ void main()
 			if (spos.z > far_split.x)
 			{
 				lpos = shadow_matrix[0]*spos;
-				lpos.xy *= shadow_res;
 				
 				float w = 1.0;
 				w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
@@ -237,11 +234,11 @@ void main()
 	
 	//spotlight shadow 1
 	vec4 lpos = shadow_matrix[4]*spos;
-	frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen); 
+	frag_color[2] = pcfSpotShadow(shadowMap4, lpos, 0.8, pos_screen); 
 	
 	//spotlight shadow 2
 	lpos = shadow_matrix[5]*spos;
-	frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen); 
+	frag_color[3] = pcfSpotShadow(shadowMap5, lpos, 0.8, pos_screen); 
 
 	//frag_color.rgb = pos.xyz;
 	//frag_color.b = shadow;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index dfe108eb01e409e1e1aa329fc26a52c60bcf0220..039fca9df2078902df83fd0afcf0ca7492e22526 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -34,10 +34,10 @@ out vec4 frag_color;
 
 uniform sampler2DRect depthMap;
 uniform sampler2DRect normalMap;
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
 uniform sampler2DShadow shadowMap4;
 uniform sampler2DShadow shadowMap5;
 uniform sampler2D noiseMap;
@@ -55,10 +55,11 @@ VARYING vec2 vary_fragcoord;
 
 uniform mat4 inv_proj;
 uniform vec2 screen_res;
-uniform vec2 shadow_res;
 uniform vec2 proj_shadow_res;
 uniform vec3 sun_dir;
 
+uniform vec2 shadow_res;
+
 uniform float shadow_bias;
 uniform float shadow_offset;
 
@@ -139,30 +140,30 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm)
 	return min(ret, 1.0);
 }
 
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
 {
 	stc.xyz /= stc.w;
-	stc.z += shadow_bias*scl;
+	stc.z += shadow_bias;
 
-	stc.x = floor(stc.x + fract(pos_screen.y*0.666666666));
+	stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x;
+	float cs = shadow2D(shadowMap, stc.xyz).x;
 	
-	float cs = shadow2DRect(shadowMap, stc.xyz).x;
 	float shadow = cs;
 	
-	shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
-        shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
-                        
+	shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+    shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+	         
         return shadow*0.2;
 }
 
-float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
+float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
 {
 	stc.xyz /= stc.w;
 	stc.z += spot_shadow_bias*scl;
 	stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap
-	
+		
 	float cs = shadow2D(shadowMap, stc.xyz).x;
 	float shadow = cs;
 
@@ -223,8 +224,7 @@ void main()
 			if (spos.z < near_split.z)
 			{
 				lpos = shadow_matrix[3]*spos;
-				lpos.xy *= shadow_res;
-
+				
 				float w = 1.0;
 				w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
 				shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w;
@@ -235,8 +235,7 @@ void main()
 			if (spos.z < near_split.y && spos.z > far_split.z)
 			{
 				lpos = shadow_matrix[2]*spos;
-				lpos.xy *= shadow_res;
-
+				
 				float w = 1.0;
 				w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
 				w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -247,8 +246,7 @@ void main()
 			if (spos.z < near_split.x && spos.z > far_split.y)
 			{
 				lpos = shadow_matrix[1]*spos;
-				lpos.xy *= shadow_res;
-
+				
 				float w = 1.0;
 				w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
 				w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@@ -259,8 +257,7 @@ void main()
 			if (spos.z > far_split.x)
 			{
 				lpos = shadow_matrix[0]*spos;
-				lpos.xy *= shadow_res;
-				
+								
 				float w = 1.0;
 				w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
 				
@@ -298,11 +295,11 @@ void main()
 	
 	//spotlight shadow 1
 	vec4 lpos = shadow_matrix[4]*spos;
-	frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen);
+	frag_color[2] = pcfSpotShadow(shadowMap4, lpos, 0.8, pos_screen);
 	
 	//spotlight shadow 2
 	lpos = shadow_matrix[5]*spos;
-	frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen);
+	frag_color[3] = pcfSpotShadow(shadowMap5, lpos, 0.8, pos_screen);
 
 	//frag_color.rgb = pos.xyz;
 	//frag_color.b = shadow;
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
old mode 100644
new mode 100755
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 89a2e9f407b9293a17099b380448913d339466b7..4eda2b92b3224d52c891471dbe5ec981e1b004a9 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -99,7 +99,6 @@ void LLDrawable::init()
 	mPositionGroup.clear();
 	mExtents[0].clear();
 	mExtents[1].clear();
-	mQuietCount = 0;
 
 	mState     = 0;
 	mVObjp   = NULL;
@@ -407,6 +406,8 @@ void LLDrawable::makeActive()
 		if (!isRoot() && !mParent->isActive())
 		{
 			mParent->makeActive();
+			//NOTE: linked set will now NEVER become static
+			mParent->setState(LLDrawable::ACTIVE_CHILD);
 		}
 
 		//all child objects must also be active
@@ -424,14 +425,6 @@ void LLDrawable::makeActive()
 			}
 		}
 
-		if (mVObjp->getPCode() == LL_PCODE_VOLUME)
-		{
-			if (mVObjp->isFlexible())
-			{
-				return;
-			}
-		}
-	
 		if (mVObjp->getPCode() == LL_PCODE_VOLUME)
 		{
 			gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME, TRUE);
@@ -439,28 +432,22 @@ void LLDrawable::makeActive()
 		updatePartition();
 	}
 
-	if (isRoot())
-	{
-		mQuietCount = 0;
-	}
-	else
-	{
-		getParent()->mQuietCount = 0;
-	}
+	llassert(isAvatar() || isRoot() || mParent->isActive());
 }
 
 
 void LLDrawable::makeStatic(BOOL warning_enabled)
 {
-	if (isState(ACTIVE))
+	if (isState(ACTIVE) && 
+		!isState(ACTIVE_CHILD) && 
+		!mVObjp->isAttachment() && 
+		!mVObjp->isFlexible())
 	{
 		clearState(ACTIVE | ANIMATED_CHILD);
 
-		if (mParent.notNull() && mParent->isActive() && warning_enabled)
-		{
-			LL_WARNS_ONCE("Drawable") << "Drawable becomes static with active parent!" << LL_ENDL;
-		}
-
+		//drawable became static with active parent, not acceptable
+		llassert(mParent.isNull() || !mParent->isActive() || !warning_enabled);
+		
 		LLViewerObject::const_child_list_t& child_list = mVObjp->getChildren();
 		for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
 			 iter != child_list.end(); iter++)
@@ -487,8 +474,8 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
 			mSpatialBridge->markDead();
 			setSpatialBridge(NULL);
 		}
+		updatePartition();
 	}
-	updatePartition();
 }
 
 // Returns "distance" between target destination and resulting xfrom
@@ -638,8 +625,6 @@ BOOL LLDrawable::updateMove()
 		return FALSE;
 	}
 	
-	makeActive();
-	
 	BOOL done;
 
 	if (isState(MOVE_UNDAMPED))
@@ -648,6 +633,7 @@ BOOL LLDrawable::updateMove()
 	}
 	else
 	{
+		makeActive();
 		done = updateMoveDamped();
 	}
 	return done;
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index 960c64fa9e48c7787de1d14c90f180191e62f8b5..b1e32bdb5b95a9eb445eb3079da0863e86f52133 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -292,6 +292,7 @@ class LLDrawable : public LLRefCount
 		RIGGED			= 0x08000000,
 		PARTITION_MOVE	= 0x10000000,
 		ANIMATED_CHILD  = 0x20000000,
+		ACTIVE_CHILD	= 0x40000000,
 	} EDrawableFlags;
 
 private: //aligned members
@@ -305,8 +306,6 @@ class LLDrawable : public LLRefCount
 	LLPointer<LLDrawable> mParent;
 
 	F32				mDistanceWRTCamera;
-	
-	S32				mQuietCount;
 
 	static S32 getCurrentFrame() { return sCurVisible; }
 	static S32 getMinVisFrameRange();
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 013c698445d872f953e8ea73a947bf780e81bb66..94dd927d26ce1a53dcdcdb85def8bf99b2f29ff1 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -419,6 +419,7 @@ void LLRenderPass::applyModelMatrix(LLDrawInfo& params)
 		gGL.loadMatrix(gGLModelView);
 		if (params.mModelMatrix)
 		{
+			llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
 			gGL.multMatrix((GLfloat*) params.mModelMatrix->mMatrix);
 		}
 		gPipeline.mMatrixOpCount++;
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 7fc78fb382f08e66334ad8a792998de92a4f0a3d..9bc32fddbdbd641e4b9b1cb82e4482b62fd32122 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -308,6 +308,7 @@ void LLDrawPoolTerrain::drawLoop()
 
 			if (model_matrix != gGLLastMatrix)
 			{
+				llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
 				gGLLastMatrix = model_matrix;
 				gGL.loadMatrix(gGLModelView);
 				if (model_matrix)
@@ -594,7 +595,8 @@ void LLDrawPoolTerrain::renderFull4TU()
 	gGL.matrixMode(LLRender::MM_TEXTURE);
 	gGL.loadIdentity();
 	gGL.translatef(-1.f, 0.f, 0.f);
-  
+	gGL.matrixMode(LLRender::MM_MODELVIEW);
+
 	// Set alpha texture and do lighting modulation
 	gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR);
 	gGL.getTexUnit(3)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA);
@@ -742,6 +744,7 @@ void LLDrawPoolTerrain::renderFull2TU()
 	gGL.matrixMode(LLRender::MM_TEXTURE);
 	gGL.loadIdentity();
 	gGL.translatef(-1.f, 0.f, 0.f);
+	gGL.matrixMode(LLRender::MM_MODELVIEW);
 
 	// Care about alpha only
 	gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
@@ -781,6 +784,7 @@ void LLDrawPoolTerrain::renderFull2TU()
 	gGL.matrixMode(LLRender::MM_TEXTURE);
 	gGL.loadIdentity();
 	gGL.translatef(-2.f, 0.f, 0.f);
+	gGL.matrixMode(LLRender::MM_MODELVIEW);
 
 	// Care about alpha only
 	gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 83f04e45a8f95b02d033d5808fb35945df8f3d99..fedbd782dcb8e60e85dd5f58ce735559021e90cf 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -116,6 +116,7 @@ void LLDrawPoolTree::render(S32 pass)
 				gGL.loadMatrix(gGLModelView);
 				if (model_matrix)
 				{
+					llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
 					gGL.multMatrix((GLfloat*) model_matrix->mMatrix);
 				}
 				gPipeline.mMatrixOpCount++;
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index bf8338e5f273d1794ccb61c6b13ebee3731c3d53..fa42b157a72865276280d6d98e8fe6be6a94d9e8 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -129,7 +129,7 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth)
 	llassert(mFullHeight <= 512);
 	llassert(mFullWidth <= 512);
 
-	if (gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete())
+	if (gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI)
 	{ //using offscreen render target, just use the bottom left corner
 		mOrigin.set(0, 0);
 	}
@@ -216,14 +216,12 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
 		return TRUE;
 	}
 
-#if 0 //THIS CAUSES MAINT-1092
-	bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete();
+	bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI;
 
 	if (use_fbo)
 	{
 		gPipeline.mWaterDis.bindTarget();
 	}
-#endif
 
 	LLGLSLShader::bindNoShader();
 	LLVertexBuffer::unbind();
@@ -258,12 +256,10 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
 		}
 	}
 
-#if 0
 	if (use_fbo)
 	{
 		gPipeline.mWaterDis.flush();
 	}
-#endif
 
 	return ret;
 }
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 9745bb6d648d2f5b7384d448660efe4b0362129c..56dc0b4157fcc3cc2679158f3d96335551157e9f 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -44,6 +44,8 @@
 #include "llvoavatar.h"
 
 /*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f;
+std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
+std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
 
 static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild");
 static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Update");
@@ -70,8 +72,45 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
 	{
 		mVO->mDrawable->makeActive() ;
 	}
+
+	mInstanceIndex = sInstanceList.size();
+	sInstanceList.push_back(this);
+	sUpdateDelay.push_back(0);
 }//-----------------------------------------------
 
+LLVolumeImplFlexible::~LLVolumeImplFlexible()
+{
+	S32 end_idx = sInstanceList.size()-1;
+	
+	if (end_idx != mInstanceIndex)
+	{
+		sInstanceList[mInstanceIndex] = sInstanceList[end_idx];
+		sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex;
+		sUpdateDelay[mInstanceIndex] = sUpdateDelay[end_idx];
+	}
+
+	sInstanceList.pop_back();
+	sUpdateDelay.pop_back();
+}
+
+//static
+void LLVolumeImplFlexible::updateClass()
+{
+	std::vector<S32>::iterator delay_iter = sUpdateDelay.begin();
+
+	for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
+			iter != sInstanceList.end();
+			++iter)
+	{
+		--(*delay_iter);
+		if (*delay_iter <= 0)
+		{
+			(*iter)->doIdleUpdate();
+		}
+		++delay_iter;
+	}
+}
+
 LLVector3 LLVolumeImplFlexible::getFramePosition() const
 {
 	return mVO->getRenderPosition();
@@ -296,22 +335,17 @@ void LLVolumeImplFlexible::updateRenderRes()
 // optimization similar to what Havok does for objects that are stationary. 
 //---------------------------------------------------------------------------------
 static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies");
-void LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVolumeImplFlexible::doIdleUpdate()
 {
 	LLDrawable* drawablep = mVO->mDrawable;
 
 	if (drawablep)
 	{
 		//LLFastTimer ftm(FTM_FLEXIBLE_UPDATE);
-
-		//flexible objects never go static
-		drawablep->mQuietCount = 0;
-		if (!drawablep->isRoot())
-		{
-			LLViewerObject* parent = (LLViewerObject*) mVO->getParent();
-			parent->mDrawable->mQuietCount = 0;
-		}
-
+		
+		//ensure drawable is active
+		drawablep->makeActive();
+			
 		if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE))
 		{
 			bool visible = drawablep->isVisible();
@@ -321,31 +355,45 @@ void LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6
 				updateRenderRes();
 				gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
 			}
-			else if	(visible &&
-				!drawablep->isState(LLDrawable::IN_REBUILD_Q1) &&
-				mVO->getPixelArea() > 256.f)
+			else
 			{
-				U32 id;
 				F32 pixel_area = mVO->getPixelArea();
 
-				if (mVO->isRootEdit())
+				U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
+
+				if	(visible)
 				{
-					id = mID;
+					if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1) &&
+					mVO->getPixelArea() > 256.f)
+					{
+						U32 id;
+				
+						if (mVO->isRootEdit())
+						{
+							id = mID;
+						}
+						else
+						{
+							LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
+							id = parent->getVolumeInterfaceID();
+						}
+
+						if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
+						{
+							sUpdateDelay[mInstanceIndex] = (S32) update_period-1;
+
+							updateRenderRes();
+
+							gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
+						}
+					}
 				}
 				else
 				{
-					LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
-					id = parent->getVolumeInterfaceID();
-				}
-
-				U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
-
-				if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
-				{
-					updateRenderRes();
-					gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
+					sUpdateDelay[mInstanceIndex] = (S32) update_period;
 				}
 			}
+
 		}
 	}
 }
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index 56d579d86f940eb48b824499faddebdeba0174f6..beb281a90626e1e194a13a5bf1e3b9555b0fce1a 100644
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -70,8 +70,16 @@ struct LLFlexibleObjectSection
 //---------------------------------------------------------
 class LLVolumeImplFlexible : public LLVolumeInterface
 {
+private:
+	static std::vector<LLVolumeImplFlexible*> sInstanceList;
+	static std::vector<S32> sUpdateDelay;
+	S32 mInstanceIndex;
+
 	public:
+		static void updateClass();
+
 		LLVolumeImplFlexible(LLViewerObject* volume, LLFlexibleObjectData* attributes);
+		~LLVolumeImplFlexible();
 
 		// Implements LLVolumeInterface
 		U32 getID() const { return mID; }
@@ -79,7 +87,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface
 		LLQuaternion getFrameRotation() const;
 		LLVolumeInterfaceType getInterfaceType() const		{ return INTERFACE_FLEXIBLE; }
 		void updateRenderRes();
-		void doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+		void doIdleUpdate();
 		BOOL doUpdateGeometry(LLDrawable *drawable);
 		LLVector3 getPivotPosition() const;
 		void onSetVolume(const LLVolumeParams &volume_params, const S32 detail);
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index df8ecb6fd97dcef894f58220d160c692c8f4686d..55f3d548ec67c08b60bc83a9584d6d903e2c2c90 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2362,12 +2362,6 @@ LLPanelLandAccess::~LLPanelLandAccess()
 void LLPanelLandAccess::refresh()
 {
 	LLFloater* parent_floater = gFloaterView->getParentFloater(this);
-	
-	if (mListAccess)
-		mListAccess->deleteAllItems();
-	if (mListBanned)
-		mListBanned->deleteAllItems();
-	
 	LLParcel *parcel = mParcel->getParcel();
 		
 	// Display options
@@ -2385,7 +2379,11 @@ void LLPanelLandAccess::refresh()
 		getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name );
 		
 		// Allow list
+		if (mListAccess)
 		{
+			// Clear the sort order so we don't re-sort on every add.
+			mListAccess->clearSortOrder();
+			mListAccess->deleteAllItems();
 			S32 count = parcel->mAccessList.size();
 			getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
 			getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
@@ -2420,13 +2418,17 @@ void LLPanelLandAccess::refresh()
 					}
 					suffix.append(" " + parent_floater->getString("Remaining") + ")");
 				}
-				if (mListAccess)
-					mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix);
+				mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix);
 			}
+			mListAccess->sortByName(TRUE);
 		}
 		
 		// Ban List
+		if(mListBanned)
 		{
+			// Clear the sort order so we don't re-sort on every add.
+			mListBanned->clearSortOrder();
+			mListBanned->deleteAllItems();
 			S32 count = parcel->mBanList.size();
 
 			getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
@@ -2464,6 +2466,7 @@ void LLPanelLandAccess::refresh()
 				}
 				mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix);
 			}
+			mListBanned->sortByName(TRUE);
 		}
 
 		if(parcel->getRegionDenyAnonymousOverride())
@@ -2599,13 +2602,13 @@ void LLPanelLandAccess::refresh_ui()
 		getChildView("AccessList")->setEnabled(can_manage_allowed);
 		S32 allowed_list_count = parcel->mAccessList.size();
 		getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
-		BOOL has_selected = mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0;
+		BOOL has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0);
 		getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected);
 		
 		getChildView("BannedList")->setEnabled(can_manage_banned);
 		S32 banned_list_count = parcel->mBanList.size();
 		getChildView("add_banned")->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST);
-		has_selected = mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0;
+		has_selected = (mListBanned && mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0);
 		getChildView("remove_banned")->setEnabled(can_manage_banned && has_selected);
 	}
 }
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 17850ff35d382fc8550fc6dc67792bf1a87c58ee..fe29bb38c73b67061731273bf1fa08f84cf77f96 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -287,8 +287,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
 	//dispatch the message
 	dispatch.dispatch(request, invoice, strings);
 
-	LLViewerRegion* region = gAgent.getRegion();
-	panel->updateControls(region);
+	panel->updateControls(gAgent.getRegion());
 }
 
 
@@ -1924,10 +1923,18 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
 	BOOL manager = (region && region->isEstateManager());
 	setCtrlsEnabled(god || owner || manager);
 	
+	BOOL has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ?  TRUE : FALSE;
+	BOOL has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ?  TRUE : FALSE;
+	BOOL has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ?  TRUE : FALSE;
+	BOOL has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ?  TRUE : FALSE;
+
 	getChildView("add_allowed_avatar_btn")->setEnabled(god || owner || manager);
-	getChildView("remove_allowed_avatar_btn")->setEnabled(god || owner || manager);
+	getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && (god || owner || manager));
+	getChildView("allowed_avatar_name_list")->setEnabled(god || owner || manager);
+	
 	getChildView("add_allowed_group_btn")->setEnabled(god || owner || manager);
-	getChildView("remove_allowed_group_btn")->setEnabled(god || owner || manager);
+	getChildView("remove_allowed_group_btn")->setEnabled(has_allowed_group && (god || owner || manager) );
+	getChildView("allowed_group_name_list")->setEnabled(god || owner || manager);
 
 	// Can't ban people from mainland, orientation islands, etc. because this
 	// creates much network traffic and server load.
@@ -1935,14 +1942,15 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
 	bool linden_estate = isLindenEstate();
 	bool enable_ban = (god || owner || manager) && !linden_estate;
 	getChildView("add_banned_avatar_btn")->setEnabled(enable_ban);
-	getChildView("remove_banned_avatar_btn")->setEnabled(enable_ban);
+	getChildView("remove_banned_avatar_btn")->setEnabled(has_banned_agent && enable_ban);
+	getChildView("banned_avatar_name_list")->setEnabled(god || owner || manager);
 
 	getChildView("message_estate_btn")->setEnabled(god || owner || manager);
 	getChildView("kick_user_from_estate_btn")->setEnabled(god || owner || manager);
 
 	// estate managers can't add estate managers
 	getChildView("add_estate_manager_btn")->setEnabled(god || owner);
-	getChildView("remove_estate_manager_btn")->setEnabled(god || owner);
+	getChildView("remove_estate_manager_btn")->setEnabled(has_estate_manager && (god || owner));
 	getChildView("estate_manager_name_list")->setEnabled(god || owner);
 
 	refresh();
@@ -1979,10 +1987,8 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
 
 void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl)
 {
-	if (checkRemovalButton(child_ctrl->getName()))
-	{
-		// do nothing
-	}
+	// Ensure appropriate state of the management ui.
+	updateControls(gAgent.getRegion());
 }
 
 bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg)
@@ -2080,23 +2086,8 @@ void LLPanelEstateInfo::refreshFromEstate()
 	getChild<LLUICtrl>("limit_payment")->setValue(estate_info.getDenyAnonymous());
 	getChild<LLUICtrl>("limit_age_verified")->setValue(estate_info.getDenyAgeUnverified());
 
-	// If visible from mainland, disable the access allowed
-	// UI, as anyone can teleport there.
-	// However, gods need to be able to edit the access list for
-	// linden estates, regardless of visibility, to allow object
-	// and L$ transfers.
-	{
-		bool visible_from_mainland = estate_info.getIsExternallyVisible();
-		bool god = gAgent.isGodlike();
-		bool linden_estate = isLindenEstate();
-
-		bool enable_agent = (!visible_from_mainland || (god && linden_estate));
-		bool enable_group = enable_agent;
-		bool enable_ban = !linden_estate;
-
-		setAccessAllowedEnabled(enable_agent, enable_group, enable_ban);
-	}
-
+	// Ensure appriopriate state of the management UI
+	updateControls(gAgent.getRegion());
 	refresh();
 }
 
@@ -2225,47 +2216,6 @@ void LLPanelEstateInfo::setOwnerName(const std::string& name)
 	getChild<LLUICtrl>("estate_owner")->setValue(LLSD(name));
 }
 
-void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent,
-												bool enable_group,
-												bool enable_ban)
-{
-	getChildView("allow_resident_label")->setEnabled(enable_agent);
-	getChildView("allowed_avatar_name_list")->setEnabled(enable_agent);
-	getChildView("allowed_avatar_name_list")->setVisible( enable_agent);
-	getChildView("add_allowed_avatar_btn")->setEnabled(enable_agent);
-	getChildView("remove_allowed_avatar_btn")->setEnabled(enable_agent);
-
-	// Groups
-	getChildView("allow_group_label")->setEnabled(enable_group);
-	getChildView("allowed_group_name_list")->setEnabled(enable_group);
-	getChildView("allowed_group_name_list")->setVisible( enable_group);
-	getChildView("add_allowed_group_btn")->setEnabled(enable_group);
-	getChildView("remove_allowed_group_btn")->setEnabled(enable_group);
-
-	// Ban
-	getChildView("ban_resident_label")->setEnabled(enable_ban);
-	getChildView("banned_avatar_name_list")->setEnabled(enable_ban);
-	getChildView("banned_avatar_name_list")->setVisible( enable_ban);
-	getChildView("add_banned_avatar_btn")->setEnabled(enable_ban);
-	getChildView("remove_banned_avatar_btn")->setEnabled(enable_ban);
-
-	// Update removal buttons if needed
-	if (enable_agent)
-	{
-		checkRemovalButton("allowed_avatar_name_list");
-	}
-
-	if (enable_group)
-	{
-		checkRemovalButton("allowed_group_name_list");
-	}
-
-	if (enable_ban)
-	{
-		checkRemovalButton("banned_avatar_name_list");
-	}
-}
-
 void LLPanelEstateInfo::clearAccessLists() 
 {
 	LLNameListCtrl* name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
@@ -2279,39 +2229,7 @@ void LLPanelEstateInfo::clearAccessLists()
 	{
 		name_list->deleteAllItems();
 	}
-}
-
-// enables/disables the "remove" button for the various allow/ban lists
-BOOL LLPanelEstateInfo::checkRemovalButton(std::string name)
-{
-	std::string btn_name = "";
-	if (name == "allowed_avatar_name_list")
-	{
-		btn_name = "remove_allowed_avatar_btn";
-	}
-	else if (name == "allowed_group_name_list")
-	{
-		btn_name = "remove_allowed_group_btn";
-	}
-	else if (name == "banned_avatar_name_list")
-	{
-		btn_name = "remove_banned_avatar_btn";
-	}
-	else if (name == "estate_manager_name_list")
-	{
-		//ONLY OWNER CAN ADD /DELET ESTATE MANAGER
-		LLViewerRegion* region = gAgent.getRegion();
-		if (region && (region->getOwner() == gAgent.getID()))
-		{
-			btn_name = "remove_estate_manager_btn";
-		}
-	}
-
-	// enable the remove button if something is selected
-	LLNameListCtrl* name_list = getChild<LLNameListCtrl>(name);
-	getChildView(btn_name)->setEnabled(name_list && name_list->getFirstSelected() ? TRUE : FALSE);
-
-	return (btn_name != "");
+	updateControls(gAgent.getRegion());
 }
 
 // static
@@ -2792,15 +2710,15 @@ bool LLDispatchSetEstateAccess::operator()(
 
 		if (allowed_agent_name_list)
 		{
-			//allowed_agent_name_list->deleteAllItems();
+			// Don't sort these as we add them, sort them when we are done.
+			allowed_agent_name_list->clearSortOrder();
 			for (S32 i = 0; i < num_allowed_agents && i < ESTATE_MAX_ACCESS_IDS; i++)
 			{
 				LLUUID id;
 				memcpy(id.mData, strings[index++].data(), UUID_BYTES);		/* Flawfinder: ignore */
 				allowed_agent_name_list->addNameItem(id);
 			}
-			panel->getChildView("remove_allowed_avatar_btn")->setEnabled(allowed_agent_name_list->getFirstSelected() ? TRUE : FALSE);
-			allowed_agent_name_list->sortByColumnIndex(0, TRUE);
+			allowed_agent_name_list->sortByName(TRUE);
 		}
 	}
 
@@ -2817,6 +2735,8 @@ bool LLDispatchSetEstateAccess::operator()(
 
 		if (allowed_group_name_list)
 		{
+			// Don't sort these as we add them, sort them when we are done.
+			allowed_group_name_list->clearSortOrder();
 			allowed_group_name_list->deleteAllItems();
 			for (S32 i = 0; i < num_allowed_groups && i < ESTATE_MAX_GROUP_IDS; i++)
 			{
@@ -2824,8 +2744,7 @@ bool LLDispatchSetEstateAccess::operator()(
 				memcpy(id.mData, strings[index++].data(), UUID_BYTES);		/* Flawfinder: ignore */
 				allowed_group_name_list->addGroupNameItem(id);
 			}
-			panel->getChildView("remove_allowed_group_btn")->setEnabled(allowed_group_name_list->getFirstSelected() ? TRUE : FALSE);
-			allowed_group_name_list->sortByColumnIndex(0, TRUE);
+			allowed_group_name_list->sortByName(TRUE);
 		}
 	}
 
@@ -2849,15 +2768,16 @@ bool LLDispatchSetEstateAccess::operator()(
 
 		if (banned_agent_name_list)
 		{
-			//banned_agent_name_list->deleteAllItems();
+			// Don't sort these as we add them, sort them when we are done.
+			banned_agent_name_list->clearSortOrder();
+
 			for (S32 i = 0; i < num_banned_agents && i < ESTATE_MAX_ACCESS_IDS; i++)
 			{
 				LLUUID id;
 				memcpy(id.mData, strings[index++].data(), UUID_BYTES);		/* Flawfinder: ignore */
 				banned_agent_name_list->addNameItem(id);
 			}
-			panel->getChildView("remove_banned_avatar_btn")->setEnabled(banned_agent_name_list->getFirstSelected() ? TRUE : FALSE);
-			banned_agent_name_list->sortByColumnIndex(0, TRUE);
+			banned_agent_name_list->sortByName(TRUE);
 		}
 	}
 
@@ -2872,6 +2792,9 @@ bool LLDispatchSetEstateAccess::operator()(
 			panel->getChild<LLNameListCtrl>("estate_manager_name_list");
 		if (estate_manager_name_list)
 		{	
+			// Don't sort these as we add them, sort them when we are done.
+			estate_manager_name_list->clearSortOrder();
+
 			estate_manager_name_list->deleteAllItems();		// Clear existing entries
 
 			// There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't 
@@ -2883,11 +2806,13 @@ bool LLDispatchSetEstateAccess::operator()(
 				memcpy(id.mData, strings[index++].data(), UUID_BYTES);		/* Flawfinder: ignore */
 				estate_manager_name_list->addNameItem(id);
 			}
-			panel->getChildView("remove_estate_manager_btn")->setEnabled(estate_manager_name_list->getFirstSelected() ? TRUE : FALSE);
-			estate_manager_name_list->sortByColumnIndex(0, TRUE);
+			estate_manager_name_list->sortByName(TRUE);
 		}
 	}
 
+	// Update the buttons which may change based on the list contents but also needs to account for general access features.
+	panel->updateControls(gAgent.getRegion());
+
 	return true;
 }
 
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index e36ef4604b23d950e8b1b303eef68d586a647e5d..f0499f19030a0a9b8b2f2eded1c9b550a77182e4 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -312,9 +312,6 @@ class LLPanelEstateInfo : public LLPanelRegionInfo
 	const std::string getOwnerName() const;
 	void setOwnerName(const std::string& name);
 
-	// If visible from mainland, allowed agent and allowed groups
-	// are ignored, so must disable UI.
-	void setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban);
 protected:
 	virtual BOOL sendUpdate();
 	// confirmation dialog callback
@@ -324,7 +321,6 @@ class LLPanelEstateInfo : public LLPanelRegionInfo
 	void commitEstateManagers();
 	
 	void clearAccessLists();
-	BOOL checkRemovalButton(std::string name);
 	BOOL checkSunHourSlider(LLUICtrl* child_ctrl);
 
 	U32 mEstateID;
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 87d048c15b4dbedd7665584cfc8ea4e34a92439e..2d91a61b545f828cef24151d07d38bc683646c0f 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -82,6 +82,7 @@ LLFloaterTopObjects::LLFloaterTopObjects(const LLSD& key)
 	mCommitCallbackRegistrar.add("TopObjects.Refresh",			boost::bind(&LLFloaterTopObjects::onRefresh, this));
 	mCommitCallbackRegistrar.add("TopObjects.GetByObjectName",	boost::bind(&LLFloaterTopObjects::onGetByObjectName, this));
 	mCommitCallbackRegistrar.add("TopObjects.GetByOwnerName",	boost::bind(&LLFloaterTopObjects::onGetByOwnerName, this));
+	mCommitCallbackRegistrar.add("TopObjects.GetByParcelName",	boost::bind(&LLFloaterTopObjects::onGetByParcelName, this));
 	mCommitCallbackRegistrar.add("TopObjects.CommitObjectsList",boost::bind(&LLFloaterTopObjects::onCommitObjectsList, this));
 }
 
@@ -99,21 +100,6 @@ BOOL LLFloaterTopObjects::postBuild()
 
 	setDefaultBtn("show_beacon_btn");
 
-	/*
-	LLLineEditor* line_editor = getChild<LLLineEditor>("owner_name_editor");
-	if (line_editor)
-	{
-		line_editor->setCommitOnFocusLost(FALSE);
-		line_editor->setCommitCallback(onGetByOwnerName, this);
-	}
-
-	line_editor = getChild<LLLineEditor>("object_name_editor");
-	if (line_editor)
-	{
-		line_editor->setCommitOnFocusLost(FALSE);
-		line_editor->setCommitCallback(onGetByObjectName, this);
-	}*/
-
 	mCurrentMode = STAT_REPORT_TOP_SCRIPTS;
 	mFlags = 0;
 	mFilter.clear();
@@ -168,9 +154,11 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
 		F32 score;
 		std::string name_buf;
 		std::string owner_buf;
+		std::string parcel_buf("unknown");
 		F32 mono_score = 0.f;
 		bool have_extended_data = false;
 		S32 public_urls = 0;
+		F32 script_memory = 0.f;
 
 		msg->getU32Fast(_PREHASH_ReportData, _PREHASH_TaskLocalID, task_local_id, block);
 		msg->getUUIDFast(_PREHASH_ReportData, _PREHASH_TaskID, task_id, block);
@@ -180,12 +168,18 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
 		msg->getF32Fast(_PREHASH_ReportData, _PREHASH_Score, score, block);
 		msg->getStringFast(_PREHASH_ReportData, _PREHASH_TaskName, name_buf, block);
 		msg->getStringFast(_PREHASH_ReportData, _PREHASH_OwnerName, owner_buf, block);
+
 		if(msg->has("DataExtended"))
 		{
 			have_extended_data = true;
 			msg->getU32("DataExtended", "TimeStamp", time_stamp, block);
 			msg->getF32("DataExtended", "MonoScore", mono_score, block);
 			msg->getS32("DataExtended", "PublicURLs", public_urls, block);
+			if (msg->getSize("DataExtended", "ParcelName") > 0)
+			{
+				msg->getString("DataExtended", "ParcelName", parcel_buf, block);
+				msg->getF32("DataExtended", "Size", script_memory, block);
+			}
 		}
 
 		LLSD element;
@@ -193,13 +187,14 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
 		element["id"] = task_id;
 
 		LLSD columns;
-		columns[0]["column"] = "score";
-		columns[0]["value"] = llformat("%0.3f", score);
-		columns[0]["font"] = "SANSSERIF";
+		S32 column_num = 0;
+		columns[column_num]["column"] = "score";
+		columns[column_num]["value"] = llformat("%0.3f", score);
+		columns[column_num++]["font"] = "SANSSERIF";
 		
-		columns[1]["column"] = "name";
-		columns[1]["value"] = name_buf;
-		columns[1]["font"] = "SANSSERIF";
+		columns[column_num]["column"] = "name";
+		columns[column_num]["value"] = name_buf;
+		columns[column_num++]["font"] = "SANSSERIF";
 		
 		// Owner names can have trailing spaces sent from server
 		LLStringUtil::trim(owner_buf);
@@ -215,28 +210,33 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
 			// ...just strip out legacy "Resident" name
 			owner_buf = LLCacheName::cleanFullName(owner_buf);
 		}
-		columns[2]["column"] = "owner";
-		columns[2]["value"] = owner_buf;
-		columns[2]["font"] = "SANSSERIF";
-
-		columns[3]["column"] = "location";
-		columns[3]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z);
-		columns[3]["font"] = "SANSSERIF";
-		columns[4]["column"] = "time";
-		columns[4]["type"] = "date";
-		columns[4]["value"] = LLDate((time_t)time_stamp);
-		columns[4]["font"] = "SANSSERIF";
+		columns[column_num]["column"] = "owner";
+		columns[column_num]["value"] = owner_buf;
+		columns[column_num++]["font"] = "SANSSERIF";
+
+		columns[column_num]["column"] = "location";
+		columns[column_num]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z);
+		columns[column_num++]["font"] = "SANSSERIF";
+
+		columns[column_num]["column"] = "parcel";
+		columns[column_num]["value"] = parcel_buf;
+		columns[column_num++]["font"] = "SANSSERIF";
+
+		columns[column_num]["column"] = "time";
+		columns[column_num]["type"] = "date";
+		columns[column_num]["value"] = LLDate((time_t)time_stamp);
+		columns[column_num++]["font"] = "SANSSERIF";
 
 		if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS
 			&& have_extended_data)
 		{
-			columns[5]["column"] = "mono_time";
-			columns[5]["value"] = llformat("%0.3f", mono_score);
-			columns[5]["font"] = "SANSSERIF";
+			columns[column_num]["column"] = "memory";
+			columns[column_num]["value"] = llformat("%0.0f", (script_memory / 1000.f));
+			columns[column_num++]["font"] = "SANSSERIF";
 
-			columns[6]["column"] = "URLs";
-			columns[6]["value"] = llformat("%d", public_urls);
-			columns[6]["font"] = "SANSSERIF";
+			columns[column_num]["column"] = "URLs";
+			columns[column_num]["value"] = llformat("%d", public_urls);
+			columns[column_num++]["font"] = "SANSSERIF";
 		}
 		element["columns"] = columns;
 		list->addElement(element);
@@ -260,18 +260,18 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
 	{
 		setTitle(getString("top_scripts_title"));
 		list->setColumnLabel("score", getString("scripts_score_label"));
-		list->setColumnLabel("mono_time", getString("scripts_mono_time_label"));
 		
 		LLUIString format = getString("top_scripts_text");
 		format.setArg("[COUNT]", llformat("%d", total_count));
-		format.setArg("[TIME]", llformat("%0.1f", mtotalScore));
+		format.setArg("[TIME]", llformat("%0.3f", mtotalScore));
 		getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
 	}
 	else
 	{
 		setTitle(getString("top_colliders_title"));
 		list->setColumnLabel("score", getString("colliders_score_label"));
-		list->setColumnLabel("mono_time", "");
+		list->setColumnLabel("URLs", "");
+		list->setColumnLabel("memory", "");
 		LLUIString format = getString("top_colliders_text");
 		format.setArg("[COUNT]", llformat("%d", total_count));
 		getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
@@ -301,6 +301,7 @@ void LLFloaterTopObjects::updateSelectionInfo()
 	{
 		getChild<LLUICtrl>("object_name_editor")->setValue(sli->getColumn(1)->getValue().asString());
 		getChild<LLUICtrl>("owner_name_editor")->setValue(sli->getColumn(2)->getValue().asString());
+		getChild<LLUICtrl>("parcel_name_editor")->setValue(sli->getColumn(4)->getValue().asString());
 	}
 }
 
@@ -480,6 +481,15 @@ void LLFloaterTopObjects::onGetByOwnerName()
 	onRefresh();
 }
 
+
+void LLFloaterTopObjects::onGetByParcelName()
+{
+	mFlags  = STAT_FILTER_BY_PARCEL_NAME;
+	mFilter = getChild<LLUICtrl>("parcel_name_editor")->getValue().asString();
+	onRefresh();
+}
+
+
 void LLFloaterTopObjects::showBeacon()
 {
 	LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h
index a608ca20f16a93754e3b70fc6bc504c24054b3a4..6edc46cf7990887381d8006e4dc238eabba591d6 100644
--- a/indra/newview/llfloatertopobjects.h
+++ b/indra/newview/llfloatertopobjects.h
@@ -73,9 +73,7 @@ class LLFloaterTopObjects : public LLFloater
 
 	void onGetByOwnerName();
 	void onGetByObjectName();
-
-//	static void onGetByOwnerNameClicked(void* data)  { onGetByOwnerName(NULL, data); };
-//	static void onGetByObjectNameClicked(void* data) { onGetByObjectName(NULL, data); };
+	void onGetByParcelName();
 
 	void showBeacon();
 
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index efffd0f98ea209b812adac7d7e55960b1a8e0983..aceb7f06146ed7fb1ee64992de30404f33ce99d9 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -63,7 +63,7 @@
 #pragma warning(pop)   // Restore all warnings to the previous state
 #endif
 
-const U32 MAX_CACHED_GROUPS = 10;
+const U32 MAX_CACHED_GROUPS = 20;
 
 //
 // LLRoleActionSet
@@ -234,10 +234,16 @@ LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
 	mRoleDataComplete(FALSE),
 	mRoleMemberDataComplete(FALSE),
 	mGroupPropertiesDataComplete(FALSE),
-	mPendingRoleMemberRequest(FALSE)
+	mPendingRoleMemberRequest(FALSE),
+	mAccessTime(0.0f)
 {
 }
 
+void LLGroupMgrGroupData::setAccessed()
+{
+	mAccessTime = (F32)LLFrameTimer::getTotalSeconds();
+}
+
 BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data)
 {
 	role_data_map_t::const_iterator it;
@@ -1360,7 +1366,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
 
 LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id)
 {
-	LLGroupMgrGroupData* group_datap;
+	LLGroupMgrGroupData* group_datap = NULL;
 
 	group_map_t::iterator existing_group = LLGroupMgr::getInstance()->mGroups.find(id);
 	if (existing_group == LLGroupMgr::getInstance()->mGroups.end())
@@ -1373,6 +1379,11 @@ LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id)
 		group_datap = existing_group->second;
 	}
 
+	if (group_datap)
+	{
+		group_datap->setAccessed();
+	}
+
 	return group_datap;
 }
 
@@ -1413,25 +1424,41 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc)
 
 void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
 {
-	if (mGroups.size() > MAX_CACHED_GROUPS)
+	while (mGroups.size() >= MAX_CACHED_GROUPS)
 	{
-		// get rid of groups that aren't observed
-		for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end() && mGroups.size() > MAX_CACHED_GROUPS / 2; )
+		// LRU: Remove the oldest un-observed group from cache until group size is small enough
+
+		F32 oldest_access = LLFrameTimer::getTotalSeconds();
+		group_map_t::iterator oldest_gi = mGroups.end();
+
+		for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end(); ++gi )
 		{
 			observer_multimap_t::iterator oi = mObservers.find(gi->first);
 			if (oi == mObservers.end())
 			{
-				// not observed
-				LLGroupMgrGroupData* unobserved_groupp = gi->second;
-				delete unobserved_groupp;
-				mGroups.erase(gi++);
-			}
-			else
-			{
-				++gi;
+				if (gi->second 
+						&& (gi->second->getAccessTime() < oldest_access))
+				{
+					oldest_access = gi->second->getAccessTime();
+					oldest_gi = gi;
+				}
 			}
 		}
+		
+		if (oldest_gi != mGroups.end())
+		{
+			delete oldest_gi->second;
+			mGroups.erase(oldest_gi);
+		}
+		else
+		{
+			// All groups must be currently open, none to remove.
+			// Just add the new group anyway, but get out of this loop as it 
+			// will never drop below max_cached_groups.
+			break;
+		}
 	}
+
 	mGroups[group_datap->getID()] = group_datap;
 }
 
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index faf0531c10df669e073783068612db6892426bcc..df3cd17e03e71288776babc08843191e18bdc0e8 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -86,7 +86,7 @@ friend class LLGroupMgrGroupData;
 
 	BOOL isInRole(const LLUUID& role_id) { return (mRolesList.find(role_id) != mRolesList.end()); }
 
-protected:
+private:
 	LLUUID	mID;
 	S32		mContribution;
 	U64		mAgentPowers;
@@ -233,6 +233,9 @@ friend class LLGroupMgr;
 	BOOL isRoleMemberDataComplete() { return mRoleMemberDataComplete; }
 	BOOL isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; }
 
+	F32 getAccessTime() const { return mAccessTime; }
+	void setAccessed();
+
 public:
 	typedef	std::map<LLUUID,LLGroupMemberData*> member_list_t;
 	typedef	std::map<LLUUID,LLGroupRoleData*> role_list_t;
@@ -280,6 +283,7 @@ friend class LLGroupMgr;
 	BOOL				mGroupPropertiesDataComplete;
 
 	BOOL				mPendingRoleMemberRequest;
+	F32					mAccessTime;
 };
 
 struct LLRoleAction
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index ab5b08291568165e81d6cb38c35349c9d6f25630..e98d3f88a6aeacc37c50c9516dcbe99f9a27ed7d 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -440,7 +440,7 @@ void show_item_original(const LLUUID& item_uuid)
 	//sidetray inventory panel
 	LLSidepanelInventory *sidepanel_inventory =	LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
 
-	bool reset_inventory_filter = !floater_inventory->isInVisibleChain();
+	bool do_reset_inventory_filter = !floater_inventory->isInVisibleChain();
 
 	LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel();
 	if (!active_panel) 
@@ -460,37 +460,49 @@ void show_item_original(const LLUUID& item_uuid)
 	}
 	active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO);
 	
-	if(reset_inventory_filter)
+	if(do_reset_inventory_filter)
 	{
-		//inventory floater
-		bool floater_inventory_visible = false;
+		reset_inventory_filter();
+	}
+}
+
 
-		LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
-		for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+void reset_inventory_filter()
+{
+	//inventory floater
+	bool floater_inventory_visible = false;
+
+	LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
+	for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+	{
+		LLFloaterInventory* floater_inventory = dynamic_cast<LLFloaterInventory*>(*iter);
+		if (floater_inventory)
 		{
-			LLFloaterInventory* floater_inventory = dynamic_cast<LLFloaterInventory*>(*iter);
-			if (floater_inventory)
-			{
-				LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel();
+			LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel();
 
-				main_inventory->onFilterEdit("");
+			main_inventory->onFilterEdit("");
 
-				if(floater_inventory->getVisible())
-				{
-					floater_inventory_visible = true;
-				}
+			if(floater_inventory->getVisible())
+			{
+				floater_inventory_visible = true;
 			}
 		}
-		if(sidepanel_inventory && !floater_inventory_visible)
+	}
+
+	if(!floater_inventory_visible)
+	{
+		LLSidepanelInventory *sidepanel_inventory =	LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+		if (sidepanel_inventory)
 		{
 			LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
-
-			main_inventory->onFilterEdit("");
+			if (main_inventory)
+			{
+				main_inventory->onFilterEdit("");
+			}
 		}
 	}
 }
 
-
 void open_outbox()
 {
 	LLFloaterReg::showInstance("outbox");
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 5cf9c528b01057ad0095a48f032ee286a7beb0bf..909f7fd10beecf7bcb9be19caf59a4c145ccaac7 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -56,6 +56,7 @@ void show_item_profile(const LLUUID& item_uuid);
 void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id);
 
 void show_item_original(const LLUUID& item_uuid);
+void reset_inventory_filter();
 
 void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::string& new_name);
 
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 71dd963f28c0dcc8ebd3a2a537cb7cb865293083..05c81957c6265308f72d4cca752a720586f32322 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -966,6 +966,7 @@ void LLInventoryPanel::doToSelected(const LLSD& userdata)
 
 void LLInventoryPanel::doCreate(const LLSD& userdata)
 {
+	reset_inventory_filter();
 	menu_create_inventory_item(mFolderRoot, LLFolderBridge::sSelf.get(), userdata);
 }
 
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 10608463b46aee47ee61220ad57339bdfe9d43d6..362308c1765d4b402283ecfaf9618cecf321b01d 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1755,6 +1755,11 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
 		shader->bind();
 	}
 
+	if (shader)
+	{
+		shader->bind();
+	}
+
 	//draw volume/plane intersections
 	{
 		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 4e28d1f526266e49d2fdbb0a6194c421b8d051f2..472c26e22da16fcd1cf1aa27ff9a2afdb1271fed 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -336,7 +336,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
 				// ...schedule a callback
 				LLAvatarNameCache::get(id,
 					boost::bind(&LLNameListCtrl::onAvatarNameCache,
-						this, _1, _2));
+						this, _1, _2, item->getHandle()));
 			}
 			break;
 		}
@@ -392,7 +392,8 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id)
 }
 
 void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
-									   const LLAvatarName& av_name)
+									   const LLAvatarName& av_name,
+									   LLHandle<LLNameListItem> item)
 {
 	std::string name;
 	if (mShortNames)
@@ -400,17 +401,14 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
 	else
 		name = av_name.getCompleteName();
 
-	item_list::iterator iter;
-	for (iter = getItemList().begin(); iter != getItemList().end(); iter++)
+	LLNameListItem* list_item = item.get();
+	if (list_item && list_item->getUUID() == agent_id)
 	{
-		LLScrollListItem* item = *iter;
-		if (item->getUUID() == agent_id)
+		LLScrollListCell* cell = list_item->getColumn(mNameColumnIndex);
+		if (cell)
 		{
-			LLScrollListCell* cell = item->getColumn(mNameColumnIndex);
-			if (cell)
-			{
-				cell->setValue(name);
-			}
+			cell->setValue(name);
+			setNeedsSort();
 		}
 	}
 
@@ -431,3 +429,8 @@ void LLNameListCtrl::updateColumns()
 		}
 	}
 }
+
+void LLNameListCtrl::sortByName(BOOL ascending)
+{
+	sortByColumnIndex(mNameColumnIndex,ascending);
+}
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index ca9956dc5386332c586bd283888564bb58f1d42a..ba85e77c656849eed058386bf01b639ecc3c5f2f 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -33,6 +33,26 @@
 
 class LLAvatarName;
 
+/**
+ * LLNameListCtrl item
+ *
+ * We don't use LLScrollListItem to be able to override getUUID(), which is needed
+ * because the name list item value is not simply an UUID but a map (uuid, is_group).
+ */
+class LLNameListItem : public LLScrollListItem, public LLHandleProvider<LLNameListItem>
+{
+public:
+	LLUUID	getUUID() const		{ return getValue()["uuid"].asUUID(); }
+protected:
+	friend class LLNameListCtrl;
+
+	LLNameListItem( const LLScrollListItem::Params& p )
+	:	LLScrollListItem(p)
+	{
+	}
+};
+
+
 class LLNameListCtrl
 :	public LLScrollListCtrl, public LLInstanceTracker<LLNameListCtrl>
 {
@@ -110,12 +130,14 @@ class LLNameListCtrl
 
 	void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; }
 
+	void sortByName(BOOL ascending);
+
 	/*virtual*/ void updateColumns();
 
 	/*virtual*/ void	mouseOverHighlightNthItem( S32 index );
 private:
 	void showInspector(const LLUUID& avatar_id, bool is_group);
-	void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
+	void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, LLHandle<LLNameListItem> item);
 
 private:
 	S32    			mNameColumnIndex;
@@ -124,24 +146,5 @@ class LLNameListCtrl
 	bool			mShortNames;  // display name only, no SLID
 };
 
-/**
- * LLNameListCtrl item
- *
- * We don't use LLScrollListItem to be able to override getUUID(), which is needed
- * because the name list item value is not simply an UUID but a map (uuid, is_group).
- */
-class LLNameListItem : public LLScrollListItem
-{
-public:
-	LLUUID	getUUID() const		{ return getValue()["uuid"].asUUID(); }
-
-protected:
-	friend class LLNameListCtrl;
-
-	LLNameListItem( const LLScrollListItem::Params& p )
-	:	LLScrollListItem(p)
-	{
-	}
-};
 
 #endif
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 7a15d931811371ac3dc5bd7fcf22e69c1270416f..00dd2065713e0f2cf0e35280afaf129c389af3f0 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -83,6 +83,7 @@ class LLPanelGroupInvite::impl
 	LLTextBox		*mGroupName;
 	std::string		mOwnerWarning;
 	std::string		mAlreadyInGroup;
+	std::string		mTooManySelected;
 	bool		mConfirmedOwnerInvite;
 
 	void (*mCloseCallback)(void* data);
@@ -185,6 +186,17 @@ void LLPanelGroupInvite::impl::submitInvitations()
 		role_member_pairs[item->getUUID()] = role_id;
 	}
 	
+	const S32 MAX_GROUP_INVITES = 100; // Max invites per request. 100 to match server cap.
+	if (role_member_pairs.size() > MAX_GROUP_INVITES)
+	{
+		// Fail!
+		LLSD msg;
+		msg["MESSAGE"] = mTooManySelected;
+		LLNotificationsUtil::add("GenericAlert", msg);
+		(*mCloseCallback)(mCloseCallbackUserData);
+		return;
+	}
+
 	LLGroupMgr::getInstance()->sendGroupMemberInvites(mGroupID, role_member_pairs);
 	
 	if(already_in_group)
@@ -621,6 +633,7 @@ BOOL LLPanelGroupInvite::postBuild()
 
 	mImplementation->mOwnerWarning = getString("confirm_invite_owner_str");
 	mImplementation->mAlreadyInGroup = getString("already_in_group");
+	mImplementation->mTooManySelected = getString("invite_selection_too_large");
 
 	update();
 	
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index c11597f532366fd793cafca0d26a6910cfcf5336..9f3273da2d9e22739fd58e1155abae657ba6726e 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -306,6 +306,7 @@ void LLPanelMainInventory::newWindow()
 
 void LLPanelMainInventory::doCreate(const LLSD& userdata)
 {
+	reset_inventory_filter();
 	menu_create_inventory_item(getPanel()->getRootFolder(), NULL, userdata);
 }
 
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 3b52dd552f56efea0bc47e9016c368bba2e3b32e..c3c37141ed4005944fd0134a65226afa801756b3 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -390,7 +390,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
 	// don't include an avatar.
 	LLViewerObject* root = obj;
 	
-	while(!root->isAvatar() && root->getParent() && !root->isJointChild())
+	while(!root->isAvatar() && root->getParent())
 	{
 		LLViewerObject* parent = (LLViewerObject*)root->getParent();
 		if (parent->isAvatar())
@@ -684,7 +684,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s
 		// don't include an avatar.
 		LLViewerObject* root = object;
 	
-		while(!root->isAvatar() && root->getParent() && !root->isJointChild())
+		while(!root->isAvatar() && root->getParent())
 		{
 			LLViewerObject* parent = (LLViewerObject*)root->getParent();
 			if (parent->isAvatar())
@@ -1397,7 +1397,7 @@ void LLSelectMgr::promoteSelectionToRoot()
 		}
 
 		LLViewerObject* parentp = object;
-		while(parentp->getParent() && !(parentp->isRootEdit() || parentp->isJointChild()))
+		while(parentp->getParent() && !(parentp->isRootEdit()))
 		{
 			parentp = (LLViewerObject*)parentp->getParent();
 		}
@@ -4474,8 +4474,7 @@ struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor
 	virtual bool apply(LLViewerObject* object)
 	{
 		if ( object->permModify() &&	// preemptive permissions check
-			 object->isRoot() &&		// don't send for child objects
-			 !object->isJointChild())
+			 object->isRoot()) 		// don't send for child objects
 		{
 			object->setFlags( mFlags, mState);
 		}
@@ -6330,8 +6329,6 @@ void LLSelectMgr::updateSelectionCenter()
 		// matches the root prim's (affecting the orientation of the manipulators). 
 		bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(TRUE))->getBoundingBoxAgent() ); 
 	                 
-		std::vector < LLViewerObject *> jointed_objects;
-
 		for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
 			 iter != mSelectedObjects->end(); iter++)
 		{
@@ -6349,11 +6346,6 @@ void LLSelectMgr::updateSelectionCenter()
 			}
 
 			bbox.addBBoxAgent( object->getBoundingBoxAgent() );
-
-			if (object->isJointChild())
-			{
-				jointed_objects.push_back(object);
-			}
 		}
 		
 		LLVector3 bbox_center_agent = bbox.getCenterAgent();
@@ -6643,19 +6635,19 @@ void LLSelectMgr::setAgentHUDZoom(F32 target_zoom, F32 current_zoom)
 bool LLObjectSelection::is_root::operator()(LLSelectNode *node)
 {
 	LLViewerObject* object = node->getObject();
-	return (object != NULL) && !node->mIndividualSelection && (object->isRootEdit() || object->isJointChild());
+	return (object != NULL) && !node->mIndividualSelection && (object->isRootEdit());
 }
 
 bool LLObjectSelection::is_valid_root::operator()(LLSelectNode *node)
 {
 	LLViewerObject* object = node->getObject();
-	return (object != NULL) && node->mValid && !node->mIndividualSelection && (object->isRootEdit() || object->isJointChild());
+	return (object != NULL) && node->mValid && !node->mIndividualSelection && (object->isRootEdit());
 }
 
 bool LLObjectSelection::is_root_object::operator()(LLSelectNode *node)
 {
 	LLViewerObject* object = node->getObject();
-	return (object != NULL) && (object->isRootEdit() || object->isJointChild());
+	return (object != NULL) && (object->isRootEdit());
 }
 
 LLObjectSelection::LLObjectSelection() : 
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 78c905f6ffba81bf941ea3cbab77d3d0648e9d28..06c87e57fc77a6baa32ec02b3f983f6b5a0fd3e5 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -3498,6 +3498,8 @@ void renderPhysicsShapes(LLSpatialGroup* group)
 			LLViewerObject* object = drawable->getVObj();
 			if (object && object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH)
 			{
+				gGL.pushMatrix();
+				gGL.multMatrix((F32*) object->getRegion()->mRenderMatrix.mMatrix);
 				//push face vertices for terrain
 				for (S32 i = 0; i < drawable->getNumFaces(); ++i)
 				{
@@ -3519,6 +3521,7 @@ void renderPhysicsShapes(LLSpatialGroup* group)
 						}
 					}
 				}
+				gGL.popMatrix();
 			}
 		}
 	}
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
old mode 100644
new mode 100755
index 7e6dfbc9d9a2d8fcc07f6d33b4cb4b02f0ef4fb8..2ed7488b856015f3d2a4acebc6ca69d2b5d8bb8b
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1249,6 +1249,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
 				S32 max_attempts;
 				if (mGetStatus == HTTP_NOT_FOUND)
 				{
+					if(mWriteToCacheState == NOT_WRITE) //map tiles
+					{
+						mState = DONE;
+						return true; // failed, means no map tile on the empty region.
+					}
+
 					mHTTPFailCount = max_attempts = 1; // Don't retry
 					llwarns << "Texture missing from server (404): " << mUrl << llendl;
 
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index fc8192f14b454f6a526be3eafeee5a9b9650fbc1..4ad05473799c7a52b4a46f1c24bb9250b705b5b2 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -237,7 +237,6 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
 	mTimeDilation(1.f),
 	mRotTime(0.f),
 	mAngularVelocityRot(),
-	mJointInfo(NULL),
 	mState(0),
 	mMedia(NULL),
 	mClickAction(0),
@@ -283,12 +282,6 @@ LLViewerObject::~LLViewerObject()
 		mInventory = NULL;
 	}
 
-	if (mJointInfo)
-	{
-		delete mJointInfo;
-		mJointInfo = NULL;
-	}
-
 	if (mPartSourcep)
 	{
 		mPartSourcep->setDead();
@@ -339,9 +332,6 @@ void LLViewerObject::markDead()
 		if (getParent())
 		{
 			((LLViewerObject *)getParent())->removeChild(this);
-			// go ahead and delete any jointinfo's that we find
-			delete mJointInfo;
-			mJointInfo = NULL;
 		}
 
 		// Mark itself as dead
@@ -744,7 +734,7 @@ void LLViewerObject::addThisAndNonJointChildren(std::vector<LLViewerObject*>& ob
 		 iter != mChildList.end(); iter++)
 	{
 		LLViewerObject* child = *iter;
-		if ( (!child->isAvatar()) && (!child->isJointChild()))
+		if ( (!child->isAvatar()))
 		{
 			child->addThisAndNonJointChildren(objects);
 		}
@@ -794,7 +784,13 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
 	}
 	LLDrawable* old_parent = mDrawable->mParent;
 	mDrawable->mParent = parentp; 
-		
+	
+	if (parentp && mDrawable->isActive())
+	{
+		parentp->makeActive();
+		parentp->setState(LLDrawable::ACTIVE_CHILD);
+	}
+
 	gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
 	if(	(old_parent != parentp && old_parent)
 		|| (parentp && parentp->isActive()))
@@ -1297,26 +1293,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 					}
 				}
 
-				U8 joint_type = 0;
-				mesgsys->getU8Fast(_PREHASH_ObjectData, _PREHASH_JointType, joint_type, block_num);
-				if (joint_type)
-				{
-					// create new joint info 
-					if (!mJointInfo)
-					{
-						mJointInfo = new LLVOJointInfo;
-					}
-					mJointInfo->mJointType = (EHavokJointType) joint_type;
-					mesgsys->getVector3Fast(_PREHASH_ObjectData, _PREHASH_JointPivot, mJointInfo->mPivot, block_num);
-					mesgsys->getVector3Fast(_PREHASH_ObjectData, _PREHASH_JointAxisOrAnchor, mJointInfo->mAxisOrAnchor, block_num);
-				}
-				else if (mJointInfo)
-				{
-					// this joint info is no longer needed
-					delete mJointInfo;
-					mJointInfo = NULL;
-				}
-
 				break;
 			}
 
@@ -1964,14 +1940,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 
 						cur_parentp->removeChild(this);
 
-						if (mJointInfo && !parent_id)
-						{
-							// since this object is no longer parent-relative
-							// we make sure we delete any joint info
-							delete mJointInfo;
-							mJointInfo = NULL;
-						}
-
 						setChanged(MOVED | SILHOUETTE);
 
 						if (mDrawable.notNull())
@@ -2098,9 +2066,15 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 		gPipeline.addDebugBlip(getPositionAgent(), color);
 	}
 
-	if ((0.0f == vel_mag_sq) && 
-		(0.0f == accel_mag_sq) &&
-		(0.0f == getAngularVelocity().magVecSquared()))
+	const F32 MAG_CUTOFF = F_APPROXIMATELY_ZERO;
+
+	llassert(vel_mag_sq >= 0.f);
+	llassert(accel_mag_sq >= 0.f);
+	llassert(getAngularVelocity().magVecSquared() >= 0.f);
+
+	if ((MAG_CUTOFF >= vel_mag_sq) && 
+		(MAG_CUTOFF >= accel_mag_sq) &&
+		(MAG_CUTOFF >= getAngularVelocity().magVecSquared()))
 	{
 		mStatic = TRUE; // This object doesn't move!
 	}
@@ -2171,117 +2145,36 @@ BOOL LLViewerObject::isActive() const
 
 
 
-BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
 	//static LLFastTimer::DeclareTimer ftm("Viewer Object");
 	//LLFastTimer t(ftm);
 
-	if (mDead)
-	{
-		// It's dead.  Don't update it.
-		return TRUE;
-	}
-
-	// CRO - don't velocity interp linked objects!
-	// Leviathan - but DO velocity interp joints
-	if (!mStatic && sVelocityInterpolate && !isSelected())
+	if (!mDead)
 	{
-		// calculate dt from last update
-		F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
-		F32 dt = mTimeDilation * dt_raw;
-
-		if (!mJointInfo)
+		// CRO - don't velocity interp linked objects!
+		// Leviathan - but DO velocity interp joints
+		if (!mStatic && sVelocityInterpolate && !isSelected())
 		{
-			applyAngularVelocity(dt);
-		}
+			// calculate dt from last update
+			F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
+			F32 dt = mTimeDilation * dt_raw;
 
-		LLViewerObject *parentp = (LLViewerObject *) getParent();
-		if (mJointInfo)
-		{
-			if (parentp)
+			applyAngularVelocity(dt);
+			
+			if (isAttachment())
 			{
-				// do parent-relative stuff
-				LLVector3 ang_vel = getAngularVelocity();
-				F32 omega = ang_vel.magVecSquared();
-				F32 angle = 0.0f;
-				LLQuaternion dQ;
-				if (omega > 0.00001f)
-				{
-					omega = sqrt(omega);
-					angle = omega * dt;
-					dQ.setQuat(angle, ang_vel);
-				}
-				LLVector3 pos = getPosition();
-	
-				if (HJT_HINGE == mJointInfo->mJointType)
-				{
-					// hinge = uniform circular motion
-					LLVector3 parent_pivot = getVelocity();
-					LLVector3 parent_axis = getAcceleration();
-	
-					angle = dt * (ang_vel * mJointInfo->mAxisOrAnchor);	// AxisOrAnchor = axis
-					dQ.setQuat(angle, mJointInfo->mAxisOrAnchor);		// AxisOrAnchor = axis
-					LLVector3 pivot_offset = pos - mJointInfo->mPivot;	// pos in pivot-frame
-					pivot_offset = pivot_offset * dQ;					// new rotated pivot-frame pos
-					pos = mJointInfo->mPivot + pivot_offset;			// parent-frame
-					LLViewerObject::setPosition(pos);
-					LLQuaternion Q_PC = getRotation();
-					setRotation(Q_PC * dQ);
-					mLastInterpUpdateSecs = time;
-				}
-				else if (HJT_POINT == mJointInfo->mJointType)
-						// || HJT_LPOINT == mJointInfo->mJointType)
-				{
-					// point-to-point = spin about axis and uniform circular motion
-					// 					of axis about the pivot point
-					//
-					// NOTE: this interpolation scheme is not quite good enough to
-					// reduce the bandwidth -- needs a gravitational correction. 
-					// Similarly for hinges with axes that deviate from vertical.
-	
-					LLQuaternion Q_PC = getRotation();
-					Q_PC = Q_PC * dQ;
-					setRotation(Q_PC);
-
-					LLVector3 pivot_to_child = - mJointInfo->mAxisOrAnchor;	// AxisOrAnchor = anchor
-					pos = mJointInfo->mPivot + pivot_to_child * Q_PC;
-					LLViewerObject::setPosition(pos);
-					mLastInterpUpdateSecs = time;
-				}
-				/* else if (HJT_WHEEL == mJointInfo->mJointInfo)
-				{
-					// wheel = uniform rotation about axis, with linear
-					//		   velocity interpolation (if any)
-					LLVector3 parent_axis = getAcceleration();	// HACK -- accel stores the parent-axis (parent-frame)
-	
-					LLQuaternion Q_PC = getRotation();
-	
-					angle = dt * (parent_axis * ang_vel);
-					dQ.setQuat(angle, parent_axis);
-	
-					Q_PC = Q_PC * dQ;
-					setRotation(Q_PC);
-
-					pos = getPosition() + dt * getVelocity();
-					LLViewerObject::setPosition(pos);
-					mLastInterpUpdateSecs = time;
-				}*/
+				mLastInterpUpdateSecs = time;
+				return;
+			}
+			else
+			{	// Move object based on it's velocity and rotation
+				interpolateLinearMotion(time, dt);
 			}
 		}
-		else if (isAttachment())
-		{
-			mLastInterpUpdateSecs = time;
-			return TRUE;
-		}
-		else
-		{	// Move object based on it's velocity and rotation
-			interpolateLinearMotion(time, dt);
-		}
-	}
-
-	updateDrawable(FALSE);
 
-	return TRUE;
+		updateDrawable(FALSE);
+	}
 }
 
 
@@ -2960,6 +2853,21 @@ void LLViewerObject::updateInventory(
 {
 	LLMemType mt(LLMemType::MTYPE_OBJECT);
 
+	std::list<LLUUID>::iterator begin = mPendingInventoryItemsIDs.begin();
+	std::list<LLUUID>::iterator end = mPendingInventoryItemsIDs.end();
+
+	bool is_fetching = std::find(begin, end, item->getAssetUUID()) != end;
+	bool is_fetched = getInventoryItemByAsset(item->getAssetUUID()) != NULL;
+
+	if (is_fetched || is_fetching)
+	{
+		return;
+	}
+	else
+	{
+		mPendingInventoryItemsIDs.push_back(item->getAssetUUID());
+	}
+
 	// This slices the object into what we're concerned about on the
 	// viewer. The simulator will take the permissions and transfer
 	// ownership.
@@ -3871,15 +3779,6 @@ void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped)
 		((LLViewerObject *)getParent())->setPositionEdit(pos_edit - position_offset);
 		updateDrawable(damped);
 	}
-	else if (isJointChild())
-	{
-		// compute new parent-relative position
-		LLViewerObject *parent = (LLViewerObject *) getParent();
-		LLQuaternion inv_parent_rot = parent->getRotation();
-		inv_parent_rot.transQuat();
-		LLVector3 pos_parent = (pos_edit - parent->getPositionRegion()) * inv_parent_rot;
-		LLViewerObject::setPosition(pos_parent, damped);
-	}
 	else
 	{
 		LLViewerObject::setPosition(pos_edit, damped);
@@ -3893,8 +3792,7 @@ LLViewerObject* LLViewerObject::getRootEdit() const
 {
 	const LLViewerObject* root = this;
 	while (root->mParent 
-		   && !(root->mJointInfo
-			   || ((LLViewerObject*)root->mParent)->isAvatar()) )
+		   && !((LLViewerObject*)root->mParent)->isAvatar()) 
 	{
 		root = (LLViewerObject*)root->mParent;
 	}
@@ -4603,19 +4501,11 @@ void LLViewerObject::clearIcon()
 
 LLViewerObject* LLViewerObject::getSubParent() 
 { 
-	if (isJointChild())
-	{
-		return this;
-	}
 	return (LLViewerObject*) getParent();
 }
 
 const LLViewerObject* LLViewerObject::getSubParent() const
 {
-	if (isJointChild())
-	{
-		return this;
-	}
 	return (const LLViewerObject*) getParent();
 }
 
@@ -5485,8 +5375,11 @@ BOOL LLViewerObject::setFlagsWithoutUpdate(U32 flags, BOOL state)
 void LLViewerObject::setPhysicsShapeType(U8 type)
 {
 	mPhysicsShapeUnknown = false;
-	mPhysicsShapeType = type;
-	mCostStale = true;
+	if (type != mPhysicsShapeType)
+	{
+		mPhysicsShapeType = type;
+		mCostStale = true;
+	}
 }
 
 void LLViewerObject::setPhysicsGravity(F32 gravity)
@@ -5513,7 +5406,6 @@ U8 LLViewerObject::getPhysicsShapeType() const
 { 
 	if (mPhysicsShapeUnknown)
 	{
-		mPhysicsShapeUnknown = false;
 		gObjectList.updatePhysicsFlags(this);
 	}
 
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 530d6531f3f50dd9659e607b4d4eb5d2cd8de95b..e60c8a8d52bb88d6c88ebc5bde619a85faa1f301 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -88,18 +88,6 @@ typedef void (*inventory_callback)(LLViewerObject*,
 								   S32 serial_num,
 								   void*);
 
-// a small struct for keeping track of joints
-struct LLVOJointInfo
-{
-	EHavokJointType mJointType;
-	LLVector3 mPivot;			// parent-frame
-	// whether the below an axis or anchor (and thus its frame)
-	// depends on the joint type:
-	//     HINGE   ==>   axis=parent-frame
-	//     P2P     ==>   anchor=child-frame
-	LLVector3 mAxisOrAnchor;	
-};
-
 // for exporting textured materials from SL
 struct LLMaterialExportInfo
 {
@@ -157,7 +145,7 @@ class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate
 	LLNameValue*	getNVPair(const std::string& name) const;			// null if no name value pair by that name
 
 	// Object create and update functions
-	virtual BOOL	idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	virtual void	idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 
 	// Types of media we can associate
 	enum { MEDIA_NONE = 0, MEDIA_SET = 1 };
@@ -188,8 +176,6 @@ class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate
 	virtual void 	updateRadius() {};
 	virtual F32 	getVObjRadius() const; // default implemenation is mDrawable->getRadius()
 	
-	BOOL 			isJointChild() const { return mJointInfo ? TRUE : FALSE; } 
-	EHavokJointType	getJointType() const { return mJointInfo ? mJointInfo->mJointType : HJT_INVALID; }
 	// for jointed and other parent-relative hacks
 	LLViewerObject* getSubParent();
 	const LLViewerObject* getSubParent() const;
@@ -737,7 +723,6 @@ class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate
 	F32				mRotTime;					// Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega)
 	LLQuaternion	mAngularVelocityRot;		// accumulated rotation from the angular velocity computations
 
-	LLVOJointInfo*  mJointInfo;
 	U8				mState;	// legacy
 	LLViewerObjectMedia* mMedia;	// NULL if no media associated
 	U8 mClickAction;
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index ea20950b36f1801505e535e4034ea10e1bbb0868..e399b45cba00d0b799cc03e09346e9bb7ec5e21c 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -49,6 +49,8 @@
 #include "llstring.h"
 #include "llhudnametag.h"
 #include "lldrawable.h"
+#include "llflexibleobject.h"
+#include "llviewertextureanim.h"
 #include "xform.h"
 #include "llsky.h"
 #include "llviewercamera.h"
@@ -78,11 +80,9 @@
 extern F32 gMinObjectDistance;
 extern BOOL gAnimateTextures;
 
-void dialog_refresh_all();
+#define MAX_CONCURRENT_PHYSICS_REQUESTS 256
 
-#define CULL_VIS
-//#define ORPHAN_SPAM
-//#define IGNORE_DEAD
+void dialog_refresh_all();
 
 // Global lists of objects - should go away soon.
 LLViewerObjectList gObjectList;
@@ -909,8 +909,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
 
 	const F64 frame_time = LLFrameTimer::getElapsedSeconds();
 	
-	std::vector<LLViewerObject*> kill_list;
-	S32 num_active_objects = 0;
 	LLViewerObject *objectp = NULL;	
 	
 	// Make a copy of the list in case something in idleUpdate() messes with it
@@ -950,7 +948,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
 	std::vector<LLViewerObject*>::iterator idle_end = idle_list.begin()+idle_count;
 
 	if (gSavedSettings.getBOOL("FreezeTime"))
-	{
+	{	
 		
 		for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin();
 			iter != idle_end; iter++)
@@ -968,24 +966,20 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
 			idle_iter != idle_end; idle_iter++)
 		{
 			objectp = *idle_iter;
-			if (objectp->idleUpdate(agent, world, frame_time))
-			{
-				num_active_objects++;				
-			}
-			else
-			{
-				//  If Idle Update returns false, kill object!
-				kill_list.push_back(objectp);
-			}
-		}
-		for (std::vector<LLViewerObject*>::iterator kill_iter = kill_list.begin();
-			kill_iter != kill_list.end(); kill_iter++)
-		{
-			objectp = *kill_iter;
-			killObject(objectp);
+			llassert(objectp->isActive());
+			objectp->idleUpdate(agent, world, frame_time);
+
 		}
+
+		//update flexible objects
+		LLVolumeImplFlexible::updateClass();
+
+		//update animated textures
+		LLViewerTextureAnim::updateClass();
 	}
 
+
+
 	fetchObjectCosts();
 	fetchPhysicsFlags();
 
@@ -1052,7 +1046,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
 	*/
 
 	LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size());
-	LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(num_active_objects);
+	LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count);
 	LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled);
 	LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled);
 }
@@ -1073,8 +1067,6 @@ void LLViewerObjectList::fetchObjectCosts()
 				LLSD id_list;
 				U32 object_index = 0;
 
-				U32 count = 0;
-
 				for (
 					std::set<LLUUID>::iterator iter = mStaleObjectCost.begin();
 					iter != mStaleObjectCost.end();
@@ -1091,7 +1083,7 @@ void LLViewerObjectList::fetchObjectCosts()
 
 					mStaleObjectCost.erase(iter++);
 
-					if (count++ >= 450)
+					if (object_index >= MAX_CONCURRENT_PHYSICS_REQUESTS)
 					{
 						break;
 					}
@@ -1136,7 +1128,7 @@ void LLViewerObjectList::fetchPhysicsFlags()
 				for (
 					std::set<LLUUID>::iterator iter = mStalePhysicsFlags.begin();
 					iter != mStalePhysicsFlags.end();
-					++iter)
+					)
 				{
 					// Check to see if a request for this object
 					// has already been made.
@@ -1146,12 +1138,14 @@ void LLViewerObjectList::fetchPhysicsFlags()
 						mPendingPhysicsFlags.insert(*iter);
 						id_list[object_index++] = *iter;
 					}
-				}
 
-				// id_list should now contain all
-				// requests in mStalePhysicsFlags before, so clear
-				// it now
-				mStalePhysicsFlags.clear();
+					mStalePhysicsFlags.erase(iter++);
+					
+					if (object_index >= MAX_CONCURRENT_PHYSICS_REQUESTS)
+					{
+						break;
+					}
+				}
 
 				if ( id_list.size() > 0 )
 				{
@@ -1405,8 +1399,9 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp)
 		{
 			mActiveObjects[idx] = mActiveObjects[last_index];
 			mActiveObjects[idx]->setListIndex(idx);
-			mActiveObjects.pop_back();
 		}
+
+		mActiveObjects.pop_back();
 	}
 }
 
@@ -1450,6 +1445,9 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
 			objectp->setOnActiveList(FALSE);
 		}
 	}
+
+	llassert(objectp->isActive() || objectp->getListIndex() == -1);
+
 }
 
 void LLViewerObjectList::updateObjectCost(LLViewerObject* object)
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index d9918e633b889c7644d6244f6a91db5a620037a6..4b0e0598f651bd249aa32efe53baac3b57a37ac8 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -529,9 +529,10 @@ void LLViewerShaderMgr::setShaders()
 			{
 				loaded = loadShadersInterface();
 			}
-			
+
 			if (loaded)
-			{
+
+		    {
 				loaded = loadTransformShaders();
 			}
 
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 7f638a24bf58aa1e93d790311c106c5c1ed09a20..e1eb54bd240c216fe60e1a83acd170caae11251a 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -2182,7 +2182,8 @@ void LLViewerFetchedTexture::setIsMissingAsset()
 	}
 	else
 	{
-		llwarns << mUrl << ": Marking image as missing" << llendl;
+		//it is normal no map tile on an empty region.
+		//llwarns << mUrl << ": Marking image as missing" << llendl;
 	}
 	if (mHasFetcher)
 	{
diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp
index 9f1ac7c49c6e10cee9023fb55e00c8f6cc2a5032..2b364851a7a7e8f880e08e2f2623689af1b27503 100644
--- a/indra/newview/llviewertextureanim.cpp
+++ b/indra/newview/llviewertextureanim.cpp
@@ -27,21 +27,37 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "llviewertextureanim.h"
+#include "llvovolume.h"
 
 #include "llmath.h"
 #include "llerror.h"
 
-LLViewerTextureAnim::LLViewerTextureAnim() : LLTextureAnim()
+std::vector<LLViewerTextureAnim*> LLViewerTextureAnim::sInstanceList;
+
+LLViewerTextureAnim::LLViewerTextureAnim(LLVOVolume* vobj) : LLTextureAnim()
 {
+	mVObj = vobj;
 	mLastFrame = -1.f;	// Force an update initially
 	mLastTime = 0.f;
 	mOffS = mOffT = 0;
 	mScaleS = mScaleT = 1;
 	mRot = 0;
+
+	mInstanceIndex = sInstanceList.size();
+	sInstanceList.push_back(this);
 }
 
 LLViewerTextureAnim::~LLViewerTextureAnim()
 {
+	S32 end_idx = sInstanceList.size()-1;
+	
+	if (end_idx != mInstanceIndex)
+	{
+		sInstanceList[mInstanceIndex] = sInstanceList[end_idx];
+		sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex;
+	}
+
+	sInstanceList.pop_back();
 }
 
 void LLViewerTextureAnim::reset()
@@ -50,6 +66,14 @@ void LLViewerTextureAnim::reset()
 	mTimer.reset();
 }
 
+//static 
+void LLViewerTextureAnim::updateClass()
+{
+	for (std::vector<LLViewerTextureAnim*>::iterator iter = sInstanceList.begin(); iter != sInstanceList.end(); ++iter)
+	{
+		(*iter)->mVObj->animateTextures();
+	}
+}
 
 S32 LLViewerTextureAnim::animateTextures(F32 &off_s, F32 &off_t,
 										F32 &scale_s, F32 &scale_t,
diff --git a/indra/newview/llviewertextureanim.h b/indra/newview/llviewertextureanim.h
index dd7bd0cb90e589ea90ea3e724b4320cc8ae013c6..abbfabceb9bb9ac023b00b4b0f10862c7a06bca1 100644
--- a/indra/newview/llviewertextureanim.h
+++ b/indra/newview/llviewertextureanim.h
@@ -30,10 +30,18 @@
 #include "lltextureanim.h"
 #include "llframetimer.h"
 
+class LLVOVolume;
+
 class LLViewerTextureAnim : public LLTextureAnim
 {
+private:
+	static std::vector<LLViewerTextureAnim*> sInstanceList;
+	S32 mInstanceIndex;
+
 public:
-	LLViewerTextureAnim();
+	static void updateClass();
+
+	LLViewerTextureAnim(LLVOVolume* vobj);
 	virtual ~LLViewerTextureAnim();
 
 	/*virtual*/ void reset();
@@ -51,6 +59,7 @@ class LLViewerTextureAnim : public LLTextureAnim
 	F32 mRot;
 
 protected:
+	LLVOVolume* mVObj;
 	LLFrameTimer mTimer;
 	F64 mLastTime;
 	F32 mLastFrame;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
old mode 100644
new mode 100755
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 05febdf93b0e2877a4fa333af328dd8936041c04..c0ef1d7a4bf2c2422b3190274f9077443f862445 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2423,7 +2423,7 @@ void LLVOAvatar::dumpAnimationState()
 //------------------------------------------------------------------------
 // idleUpdate()
 //------------------------------------------------------------------------
-BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
 	LLMemType mt(LLMemType::MTYPE_AVATAR);
 	LLFastTimer t(FTM_AVATAR_UPDATE);
@@ -2431,12 +2431,12 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 	if (isDead())
 	{
 		llinfos << "Warning!  Idle on dead avatar" << llendl;
-		return TRUE;
+		return;
 	}	
 
  	if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR)))
 	{
-		return TRUE;
+		return;
 	}
 
 	checkTextureLoading() ;
@@ -2519,8 +2519,6 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 	
 	idleUpdateNameTag( root_pos_last );
 	idleUpdateRenderCost();
-
-	return TRUE;
 }
 
 void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index f5692bb52f73d3885f1b911e7c4b69a1768984ed..1adb6809625ef16385e38874a1b142d661559eab 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -134,7 +134,7 @@ class LLVOAvatar :
 													 U32 block_num,
 													 const EObjectUpdateType update_type,
 													 LLDataPacker *dp);
-	virtual BOOL   	 	 	idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	virtual void   	 	 	idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 	virtual BOOL   	 	 	updateLOD();
 	BOOL  	 	 	 	 	updateJointLODs();
 	void					updateLODRiggedAttachments( void );
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 6d672acc326fc1d2b88cac8c9897bc9268db96ce..07b9b782554615712d434ca11ed703b1c840c4ed 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -668,15 +668,13 @@ BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent)
 }
 
 // virtual
-BOOL LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
-	if (!isAgentAvatarValid())
+	if (isAgentAvatarValid())
 	{
-		return TRUE;
+		LLVOAvatar::idleUpdate(agent, world, time);
+		idleUpdateTractorBeam();
 	}
-	LLVOAvatar::idleUpdate(agent, world, time);
-	idleUpdateTractorBeam();
-	return TRUE;
 }
 
 // virtual
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 2b273e616c963a4fc926c7a353726613f83e10fa..7bd0c0bf93428af3743a90d030b4dab725f577d4 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -85,7 +85,7 @@ class LLVOAvatarSelf :
 	//--------------------------------------------------------------------
 public:
 	/*virtual*/ void 		updateRegion(LLViewerRegion *regionp);
-	/*virtual*/ BOOL   	 	idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	/*virtual*/ void   	 	idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 
 	//--------------------------------------------------------------------
 	// LLCharacter interface and related
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 5ad9ccc9af3937c2c8256656acdd1401822c729e..566c33c0afc1b7fb7b73d6feef2945f47eac8457 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -277,17 +277,17 @@ BOOL LLVOGrass::isActive() const
 	return TRUE;
 }
 
-BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
  	if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_GRASS)))
 	{
-		return TRUE;
+		return;
 	}
 	
 	if (!mDrawable)
 	{
 		// So drones work.
-		return TRUE;
+		return;
 	}
 
 	if(LLVOTree::isTreeRenderingStopped()) //stop rendering grass
@@ -297,14 +297,14 @@ BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 			mNumBlades = 0 ;
 			gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
 		}
-		return TRUE ;
+		return;
 	}
 	else if(!mNumBlades)//restart grass rendering
 	{
 		mNumBlades = GRASS_MAX_BLADES ;
 		gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
 		
-		return TRUE ;
+		return;
 	}
 
 	if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime()))
@@ -312,7 +312,7 @@ BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 		gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
 	}
 
-	return TRUE;
+	return;
 }
 
 
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index 00a59facf742658131024510d544e499c6fa362e..b9835b8802a77f5ff8420e8ddb5452e57a8553bd 100644
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -73,7 +73,7 @@ class LLVOGrass : public LLAlphaObject
 	void plantBlades();
 
 	/*virtual*/ BOOL    isActive() const; // Whether this object needs to do an idleUpdate.
-	BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	/*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 
 	/*virtual*/ BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end, 
 										  S32 face = -1,                        // which face to check, -1 = ALL_SIDES
diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp
index 6da54435e3ca9904686f5d832d5527678c930ba0..97b7418b40841552d127a214a60751831262af83 100644
--- a/indra/newview/llvoground.cpp
+++ b/indra/newview/llvoground.cpp
@@ -49,18 +49,8 @@ LLVOGround::~LLVOGround()
 {
 }
 
-BOOL LLVOGround::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOGround::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
- 	if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_GROUND)))
-	{
-		return TRUE;
-	}
-	
-	/*if (mDrawable)
-	{
-		gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
-	}*/
-	return TRUE;
 }
 
 
diff --git a/indra/newview/llvoground.h b/indra/newview/llvoground.h
index 73b097327e5dfec7bbbe6eb9266884a720c33de6..290579b4da68337319271c3393cd3022a9d9882f 100644
--- a/indra/newview/llvoground.h
+++ b/indra/newview/llvoground.h
@@ -41,7 +41,7 @@ class LLVOGround : public LLStaticViewerObject
 public:
 	LLVOGround(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
 
-	/*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	/*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 	
 	// Graphical stuff for objects - maybe broken out into render class
 	// later?
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 9cce68fff69796cfedec00e8539e66ff1970d3c2..e4f9915e9357463bc8d4d0625383e2a0477d79a0 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -196,9 +196,8 @@ void LLVOPartGroup::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
 	mDrawable->setPositionGroup(pos);
 }
 
-BOOL LLVOPartGroup::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOPartGroup::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
-	return TRUE;
 }
 
 void LLVOPartGroup::setPixelAreaAndAngle(LLAgent &agent)
diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h
index 43b2844f07b5e3409fec28e51afdae19366e3882..42c1252d01f69c9fccfbf08c272c35205b03f10b 100644
--- a/indra/newview/llvopartgroup.h
+++ b/indra/newview/llvopartgroup.h
@@ -63,7 +63,7 @@ class LLVOPartGroup : public LLAlphaObject
 	LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
 
 	/*virtual*/ BOOL    isActive() const; // Whether this object needs to do an idleUpdate.
-	BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 
 	virtual F32 getBinRadius();
 	virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 312034022ea33a4fbed264e9ca4b64a48f8e5d4c..31358df85fc082e5bc9c660489d80a93251374ff 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -1052,9 +1052,8 @@ void LLVOSky::calcAtmospherics(void)
 	mFadeColor.setAlpha(0);
 }
 
-BOOL LLVOSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
-	return TRUE;
 }
 
 BOOL LLVOSky::updateSky()
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index 6e6898d80a1a3807fca8989bd3d35d4cc22dbbd8..2a150eccb96b118b3a6300ead23e4d0e0da0cecf 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -461,7 +461,7 @@ class LLVOSky : public LLStaticViewerObject
 	void cleanupGL();
 	void restoreGL();
 
-	/*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	/*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 	BOOL updateSky();
 	
 	// Graphical stuff for objects - maybe broken out into render class
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index 94a3111f4cb6e06eefae11518f6a38265f0fd89b..cb905d02da0dd458f2490b45a7490e749943a73f 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -80,9 +80,9 @@ class LLVertexBufferTerrain : public LLVertexBuffer
 			glNormalPointer(GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_NORMAL], (void*)(base + mOffsets[TYPE_NORMAL]));
 		}
 		if (data_mask & MAP_TEXCOORD3)
-		{ //substitute tex coord 0 for tex coord 3
+		{ //substitute tex coord 1 for tex coord 3
 			glClientActiveTextureARB(GL_TEXTURE3_ARB);
-			glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], (void*)(base + mOffsets[TYPE_TEXCOORD0]));
+			glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], (void*)(base + mOffsets[TYPE_TEXCOORD1]));
 			glClientActiveTextureARB(GL_TEXTURE0_ARB);
 		}
 		if (data_mask & MAP_TEXCOORD2)
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 337ddfb24d11ceecb24603c1f65f0c876b351319..6687ce432fadaade4b53250b167e49d369312cf5 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -339,11 +339,11 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
 	return retval;
 }
 
-BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
  	if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TREE)))
 	{
-		return TRUE;
+		return;
 	}
 	
 	S32 trunk_LOD = sMAX_NUM_TREE_LOD_LEVELS ;
@@ -393,8 +393,6 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 	}
 
 	mTrunkLOD = trunk_LOD;
-
-	return TRUE;
 }
 
 const F32 TREE_BLEND_MIN = 1.f;
diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h
index 0554935539e6fb078f032c1630f4d9d29923a096..52debc85abcc6ce86317df93e3f12b8ed62d188b 100644
--- a/indra/newview/llvotree.h
+++ b/indra/newview/llvotree.h
@@ -59,7 +59,7 @@ class LLVOTree : public LLViewerObject
 											void **user_data,
 											U32 block_num, const EObjectUpdateType update_type,
 											LLDataPacker *dp);
-	/*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	/*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 	
 	// Graphical stuff for objects - maybe broken out into render class later?
 	/*virtual*/ void render(LLAgent &agent);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a656179c8f3a78f99ec8f963dd24de9bbf32169d..958282f1ebe7d35fabf4e875fc77714ffffddb7a 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -329,7 +329,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
 			{
 				if (!mTextureAnimp)
 				{
-					mTextureAnimp = new LLViewerTextureAnim();
+					mTextureAnimp = new LLViewerTextureAnim(this);
 				}
 				else
 				{
@@ -431,7 +431,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
 			{
 				if (!mTextureAnimp)
 				{
-					mTextureAnimp = new LLViewerTextureAnim();
+					mTextureAnimp = new LLViewerTextureAnim(this);
 				}
 				else
 				{
@@ -499,183 +499,144 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
 
 void LLVOVolume::animateTextures()
 {
-	F32 off_s = 0.f, off_t = 0.f, scale_s = 1.f, scale_t = 1.f, rot = 0.f;
-	S32 result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot);
-	
-	if (result)
+	if (!mDead)
 	{
-		if (!mTexAnimMode)
-		{
-			mFaceMappingChanged = TRUE;
-			gPipeline.markTextured(mDrawable);
-		}
-		mTexAnimMode = result | mTextureAnimp->mMode;
-				
-		S32 start=0, end=mDrawable->getNumFaces()-1;
-		if (mTextureAnimp->mFace >= 0 && mTextureAnimp->mFace <= end)
-		{
-			start = end = mTextureAnimp->mFace;
-		}
-		
-		for (S32 i = start; i <= end; i++)
+		F32 off_s = 0.f, off_t = 0.f, scale_s = 1.f, scale_t = 1.f, rot = 0.f;
+		S32 result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot);
+	
+		if (result)
 		{
-			LLFace* facep = mDrawable->getFace(i);
-			if (!facep) continue;
-			if(facep->getVirtualSize() <= MIN_TEX_ANIM_SIZE && facep->mTextureMatrix) continue;
-
-			const LLTextureEntry* te = facep->getTextureEntry();
-			
-			if (!te)
+			if (!mTexAnimMode)
 			{
-				continue;
+				mFaceMappingChanged = TRUE;
+				gPipeline.markTextured(mDrawable);
 			}
-		
-			if (!(result & LLViewerTextureAnim::ROTATE))
+			mTexAnimMode = result | mTextureAnimp->mMode;
+				
+			S32 start=0, end=mDrawable->getNumFaces()-1;
+			if (mTextureAnimp->mFace >= 0 && mTextureAnimp->mFace <= end)
 			{
-				te->getRotation(&rot);
+				start = end = mTextureAnimp->mFace;
 			}
-			if (!(result & LLViewerTextureAnim::TRANSLATE))
-			{
-				te->getOffset(&off_s,&off_t);
-			}			
-			if (!(result & LLViewerTextureAnim::SCALE))
+		
+			for (S32 i = start; i <= end; i++)
 			{
-				te->getScale(&scale_s, &scale_t);
-			}
+				LLFace* facep = mDrawable->getFace(i);
+				if (!facep) continue;
+				if(facep->getVirtualSize() <= MIN_TEX_ANIM_SIZE && facep->mTextureMatrix) continue;
 
-			if (!facep->mTextureMatrix)
-			{
-				facep->mTextureMatrix = new LLMatrix4();
-			}
+				const LLTextureEntry* te = facep->getTextureEntry();
+			
+				if (!te)
+				{
+					continue;
+				}
+		
+				if (!(result & LLViewerTextureAnim::ROTATE))
+				{
+					te->getRotation(&rot);
+				}
+				if (!(result & LLViewerTextureAnim::TRANSLATE))
+				{
+					te->getOffset(&off_s,&off_t);
+				}			
+				if (!(result & LLViewerTextureAnim::SCALE))
+				{
+					te->getScale(&scale_s, &scale_t);
+				}
+
+				if (!facep->mTextureMatrix)
+				{
+					facep->mTextureMatrix = new LLMatrix4();
+				}
 
-			LLMatrix4& tex_mat = *facep->mTextureMatrix;
-			tex_mat.setIdentity();
-			LLVector3 trans ;
+				LLMatrix4& tex_mat = *facep->mTextureMatrix;
+				tex_mat.setIdentity();
+				LLVector3 trans ;
 
-			if(facep->isAtlasInUse())
-			{
-				//
-				//if use atlas for animated texture
-				//apply the following transform to the animation matrix.
-				//
-
-				F32 tcoord_xoffset = 0.f ;
-				F32 tcoord_yoffset = 0.f ;
-				F32 tcoord_xscale = 1.f ;
-				F32 tcoord_yscale = 1.f ;			
 				if(facep->isAtlasInUse())
 				{
-					const LLVector2* tmp = facep->getTexCoordOffset() ;
-					tcoord_xoffset = tmp->mV[0] ; 
-					tcoord_yoffset = tmp->mV[1] ;
+					//
+					//if use atlas for animated texture
+					//apply the following transform to the animation matrix.
+					//
+
+					F32 tcoord_xoffset = 0.f ;
+					F32 tcoord_yoffset = 0.f ;
+					F32 tcoord_xscale = 1.f ;
+					F32 tcoord_yscale = 1.f ;			
+					if(facep->isAtlasInUse())
+					{
+						const LLVector2* tmp = facep->getTexCoordOffset() ;
+						tcoord_xoffset = tmp->mV[0] ; 
+						tcoord_yoffset = tmp->mV[1] ;
 
-					tmp = facep->getTexCoordScale() ;
-					tcoord_xscale = tmp->mV[0] ; 
-					tcoord_yscale = tmp->mV[1] ;	
-				}
-				trans.set(LLVector3(tcoord_xoffset + tcoord_xscale * (off_s+0.5f), tcoord_yoffset + tcoord_yscale * (off_t+0.5f), 0.f));
+						tmp = facep->getTexCoordScale() ;
+						tcoord_xscale = tmp->mV[0] ; 
+						tcoord_yscale = tmp->mV[1] ;	
+					}
+					trans.set(LLVector3(tcoord_xoffset + tcoord_xscale * (off_s+0.5f), tcoord_yoffset + tcoord_yscale * (off_t+0.5f), 0.f));
 
-				tex_mat.translate(LLVector3(-(tcoord_xoffset + tcoord_xscale * 0.5f), -(tcoord_yoffset + tcoord_yscale * 0.5f), 0.f));
-			}
-			else	//non atlas
-			{
-				trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f));			
-				tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
-			}
+					tex_mat.translate(LLVector3(-(tcoord_xoffset + tcoord_xscale * 0.5f), -(tcoord_yoffset + tcoord_yscale * 0.5f), 0.f));
+				}
+				else	//non atlas
+				{
+					trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f));			
+					tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
+				}
 
-			LLVector3 scale(scale_s, scale_t, 1.f);			
-			LLQuaternion quat;
-			quat.setQuat(rot, 0, 0, -1.f);
+				LLVector3 scale(scale_s, scale_t, 1.f);			
+				LLQuaternion quat;
+				quat.setQuat(rot, 0, 0, -1.f);
 		
-			tex_mat.rotate(quat);				
+				tex_mat.rotate(quat);				
 
-			LLMatrix4 mat;
-			mat.initAll(scale, LLQuaternion(), LLVector3());
-			tex_mat *= mat;
+				LLMatrix4 mat;
+				mat.initAll(scale, LLQuaternion(), LLVector3());
+				tex_mat *= mat;
 		
-			tex_mat.translate(trans);
+				tex_mat.translate(trans);
+			}
 		}
-	}
-	else
-	{
-		if (mTexAnimMode && mTextureAnimp->mRate == 0)
+		else
 		{
-			U8 start, count;
-
-			if (mTextureAnimp->mFace == -1)
+			if (mTexAnimMode && mTextureAnimp->mRate == 0)
 			{
-				start = 0;
-				count = getNumTEs();
-			}
-			else
-			{
-				start = (U8) mTextureAnimp->mFace;
-				count = 1;
-			}
+				U8 start, count;
 
-			for (S32 i = start; i < start + count; i++)
-			{
-				if (mTexAnimMode & LLViewerTextureAnim::TRANSLATE)
+				if (mTextureAnimp->mFace == -1)
 				{
-					setTEOffset(i, mTextureAnimp->mOffS, mTextureAnimp->mOffT);				
+					start = 0;
+					count = getNumTEs();
 				}
-				if (mTexAnimMode & LLViewerTextureAnim::SCALE)
+				else
 				{
-					setTEScale(i, mTextureAnimp->mScaleS, mTextureAnimp->mScaleT);	
+					start = (U8) mTextureAnimp->mFace;
+					count = 1;
 				}
-				if (mTexAnimMode & LLViewerTextureAnim::ROTATE)
+
+				for (S32 i = start; i < start + count; i++)
 				{
-					setTERotation(i, mTextureAnimp->mRot);
+					if (mTexAnimMode & LLViewerTextureAnim::TRANSLATE)
+					{
+						setTEOffset(i, mTextureAnimp->mOffS, mTextureAnimp->mOffT);				
+					}
+					if (mTexAnimMode & LLViewerTextureAnim::SCALE)
+					{
+						setTEScale(i, mTextureAnimp->mScaleS, mTextureAnimp->mScaleT);	
+					}
+					if (mTexAnimMode & LLViewerTextureAnim::ROTATE)
+					{
+						setTERotation(i, mTextureAnimp->mRot);
+					}
 				}
-			}
-
-			gPipeline.markTextured(mDrawable);
-			mFaceMappingChanged = TRUE;
-			mTexAnimMode = 0;
-		}
-	}
-}
-BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
-{
-	LLViewerObject::idleUpdate(agent, world, time);
-
-	//static LLFastTimer::DeclareTimer ftm("Volume Idle");
-	//LLFastTimer t(ftm);
 
-	if (mDead || mDrawable.isNull())
-	{
-		return TRUE;
-	}
-	
-	///////////////////////
-	//
-	// Do texture animation stuff
-	//
-
-	if (mTextureAnimp && gAnimateTextures)
-	{
-		animateTextures();
-	}
-
-	// Dispatch to implementation
-	if (mVolumeImpl)
-	{
-		mVolumeImpl->doIdleUpdate(agent, world, time);
-	}
-
-	const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40;
-
-	if (mDrawable->isActive())
-	{
-		if (mDrawable->isRoot() && 
-			mDrawable->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES && 
-			(!mDrawable->getParent() || !mDrawable->getParent()->isActive()))
-		{
-			mDrawable->makeStatic();
+				gPipeline.markTextured(mDrawable);
+				mFaceMappingChanged = TRUE;
+				mTexAnimMode = 0;
+			}
 		}
 	}
-
-	return TRUE;
 }
 
 void LLVOVolume::updateTextures()
@@ -698,7 +659,8 @@ void LLVOVolume::updateTextures()
 			}
 		}
 
-	}
+
+    }
 }
 
 BOOL LLVOVolume::isVisible() const 
@@ -916,8 +878,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
 
 BOOL LLVOVolume::isActive() const
 {
-	return !mStatic || mTextureAnimp || (mVolumeImpl && mVolumeImpl->isActive()) || 
-		(mDrawable.notNull() && mDrawable->isActive());
+	return !mStatic;
 }
 
 BOOL LLVOVolume::setMaterial(const U8 material)
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 8cb69930beae150407c7a59b86331e6dd31b69c8..0082f2e9914d22c1fcce046c904491a60adda210 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -68,7 +68,7 @@ class LLVolumeInterface
 public:
 	virtual ~LLVolumeInterface() { }
 	virtual LLVolumeInterfaceType getInterfaceType() const = 0;
-	virtual void doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) = 0;
+	virtual void doIdleUpdate() = 0;
 	virtual BOOL doUpdateGeometry(LLDrawable *drawable) = 0;
 	virtual LLVector3 getPivotPosition() const = 0;
 	virtual void onSetVolume(const LLVolumeParams &volume_params, const S32 detail) = 0;
@@ -114,8 +114,7 @@ class LLVOVolume : public LLViewerObject
 				void	deleteFaces();
 
 				void	animateTextures();
-	/*virtual*/ BOOL	idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
-
+	
 	            BOOL    isVisible() const ;
 	/*virtual*/ BOOL	isActive() const;
 	/*virtual*/ BOOL	isAttachment() const;
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 942eff61718caab626837ba0c8b64fc5206bd575..e8a1c3d1d62124a3dae881803be76bc33a11d4ea 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -100,17 +100,8 @@ void LLVOWater::updateTextures()
 }
 
 // Never gets called
-BOOL LLVOWater::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void  LLVOWater::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
- 	/*if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER)))
-	{
-		return TRUE;
-	}
-	if (mDrawable) 
-	{
-		gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
-	}*/
-	return TRUE;
 }
 
 LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline)
diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h
index ed709dd84017c7ea69441e5e9a65426c55724ac3..cf9323ef2e3298a878e2e5b5d96b4fa027d7aa51 100644
--- a/indra/newview/llvowater.h
+++ b/indra/newview/llvowater.h
@@ -58,7 +58,7 @@ class LLVOWater : public LLStaticViewerObject
 	static void initClass();
 	static void cleanupClass();
 
-	/*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	/*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 	/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
 	/*virtual*/ BOOL        updateGeometry(LLDrawable *drawable);
 	/*virtual*/ void		updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index afd902201bcfbfc1ff20c2579fd9ca1e547e30e0..a33f42cf8477cd277111a1ece858539e86f285c0 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -92,9 +92,9 @@ void LLVOWLSky::initSunDirection(LLVector3 const & sun_direction,
 {
 }
 
-BOOL LLVOWLSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOWLSky::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
 {
-	return TRUE;
+	
 }
 
 BOOL LLVOWLSky::isActive(void) const
diff --git a/indra/newview/llvowlsky.h b/indra/newview/llvowlsky.h
index 825e13a203d99cb1bab1239d2cf59285227164f1..729dced15ea5c83a7b3a543e7dce6b37dd3885f2 100644
--- a/indra/newview/llvowlsky.h
+++ b/indra/newview/llvowlsky.h
@@ -53,7 +53,7 @@ class LLVOWLSky : public LLStaticViewerObject {
 	void initSunDirection(LLVector3 const & sun_direction,
 		LLVector3 const & sun_angular_velocity);
 
-	/*virtual*/ BOOL		 idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
+	/*virtual*/ void		 idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
 	/*virtual*/ BOOL		 isActive(void) const;
 	/*virtual*/ LLDrawable * createDrawable(LLPipeline *pipeline);
 	/*virtual*/ BOOL		 updateGeometry(LLDrawable *drawable);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 7140515e46dfaf89dffd3bd38d5f0fa019ac587a..f6b0d6c5fa2bd95952302dc986927edb5d0a774a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -449,6 +449,19 @@ LLPipeline::LLPipeline() :
 	mLightFunc = 0;
 }
 
+void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name)
+{
+	LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl(name);
+	if ( cntrl_ptr.isNull() )
+	{
+		llwarns << "Global setting name not found:" << name << llendl;
+	}
+	else
+	{
+		cntrl_ptr->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+	}
+}
+
 void LLPipeline::init()
 {
 	LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
@@ -533,88 +546,86 @@ void LLPipeline::init()
 	//
 	// Update all settings to trigger a cached settings refresh
 	//
-
-	gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderUseFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderAvatarMaxVisible")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderDelayVBUpdate")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	
-	gSavedSettings.getControl("UseOcclusion")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	
-	gSavedSettings.getControl("VertexShaderEnable")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderAvatarVP")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("WindLightUseAtmosShaders")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderDeferredSunWash")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderFSAASamples")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderResolutionDivisor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderUIBuffer")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowDetail")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderDeferredSSAO")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowResolutionScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderLocalLights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderDelayCreation")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderAnimateRes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("FreezeTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("DebugBeaconLineWidth")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderHighlightBrightness")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderHighlightColor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderHighlightThickness")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderSpotLightsInNondeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewAmbientColor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewDiffuse0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewSpecular0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewDiffuse1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewSpecular1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewDiffuse2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewSpecular2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewDirection0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewDirection1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("PreviewDirection2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowMinLuminance")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowMaxExtractAlpha")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowWarmthAmount")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowLumWeights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowWarmthWeights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowResolutionPow")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowIterations")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowWidth")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderGlowStrength")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderDepthOfField")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("CameraFocusTransitionTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("CameraFNumber")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("CameraFocalLength")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("CameraFieldOfView")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowNoise")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowBlurSize")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderSSAOScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderSSAOMaxScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderSSAOFactor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderSSAOEffect")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowOffsetError")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowBiasError")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowBias")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderSpotShadowOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderSpotShadowBias")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderEdgeDepthCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderEdgeNormCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowGaussian")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowBlurDistFactor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderDeferredAtmospheric")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderReflectionDetail")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderHighlightFadeTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowClipPlanes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowOrthoClipPlanes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowNearDist")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowSplitExponent")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowErrorCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("RenderShadowFOVCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("CameraOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("CameraMaxCoF")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
-	gSavedSettings.getControl("CameraDoFResScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+	connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaDeferred");
+	connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred");
+	connectRefreshCachedSettingsSafe("RenderUseFarClip");
+	connectRefreshCachedSettingsSafe("RenderAvatarMaxVisible");
+	connectRefreshCachedSettingsSafe("RenderDelayVBUpdate");
+	connectRefreshCachedSettingsSafe("UseOcclusion");
+	connectRefreshCachedSettingsSafe("VertexShaderEnable");
+	connectRefreshCachedSettingsSafe("RenderAvatarVP");
+	connectRefreshCachedSettingsSafe("WindLightUseAtmosShaders");
+	connectRefreshCachedSettingsSafe("RenderDeferred");
+	connectRefreshCachedSettingsSafe("RenderDeferredSunWash");
+	connectRefreshCachedSettingsSafe("RenderFSAASamples");
+	connectRefreshCachedSettingsSafe("RenderResolutionDivisor");
+	connectRefreshCachedSettingsSafe("RenderUIBuffer");
+	connectRefreshCachedSettingsSafe("RenderShadowDetail");
+	connectRefreshCachedSettingsSafe("RenderDeferredSSAO");
+	connectRefreshCachedSettingsSafe("RenderShadowResolutionScale");
+	connectRefreshCachedSettingsSafe("RenderLocalLights");
+	connectRefreshCachedSettingsSafe("RenderDelayCreation");
+	connectRefreshCachedSettingsSafe("RenderAnimateRes");
+	connectRefreshCachedSettingsSafe("FreezeTime");
+	connectRefreshCachedSettingsSafe("DebugBeaconLineWidth");
+	connectRefreshCachedSettingsSafe("RenderHighlightBrightness");
+	connectRefreshCachedSettingsSafe("RenderHighlightColor");
+	connectRefreshCachedSettingsSafe("RenderHighlightThickness");
+	connectRefreshCachedSettingsSafe("RenderSpotLightsInNondeferred");
+	connectRefreshCachedSettingsSafe("PreviewAmbientColor");
+	connectRefreshCachedSettingsSafe("PreviewDiffuse0");
+	connectRefreshCachedSettingsSafe("PreviewSpecular0");
+	connectRefreshCachedSettingsSafe("PreviewDiffuse1");
+	connectRefreshCachedSettingsSafe("PreviewSpecular1");
+	connectRefreshCachedSettingsSafe("PreviewDiffuse2");
+	connectRefreshCachedSettingsSafe("PreviewSpecular2");
+	connectRefreshCachedSettingsSafe("PreviewDirection0");
+	connectRefreshCachedSettingsSafe("PreviewDirection1");
+	connectRefreshCachedSettingsSafe("PreviewDirection2");
+	connectRefreshCachedSettingsSafe("RenderGlowMinLuminance");
+	connectRefreshCachedSettingsSafe("RenderGlowMaxExtractAlpha");
+	connectRefreshCachedSettingsSafe("RenderGlowWarmthAmount");
+	connectRefreshCachedSettingsSafe("RenderGlowLumWeights");
+	connectRefreshCachedSettingsSafe("RenderGlowWarmthWeights");
+	connectRefreshCachedSettingsSafe("RenderGlowResolutionPow");
+	connectRefreshCachedSettingsSafe("RenderGlowIterations");
+	connectRefreshCachedSettingsSafe("RenderGlowWidth");
+	connectRefreshCachedSettingsSafe("RenderGlowStrength");
+	connectRefreshCachedSettingsSafe("RenderDepthOfField");
+	connectRefreshCachedSettingsSafe("CameraFocusTransitionTime");
+	connectRefreshCachedSettingsSafe("CameraFNumber");
+	connectRefreshCachedSettingsSafe("CameraFocalLength");
+	connectRefreshCachedSettingsSafe("CameraFieldOfView");
+	connectRefreshCachedSettingsSafe("RenderShadowNoise");
+	connectRefreshCachedSettingsSafe("RenderShadowBlurSize");
+	connectRefreshCachedSettingsSafe("RenderSSAOScale");
+	connectRefreshCachedSettingsSafe("RenderSSAOMaxScale");
+	connectRefreshCachedSettingsSafe("RenderSSAOFactor");
+	connectRefreshCachedSettingsSafe("RenderSSAOEffect");
+	connectRefreshCachedSettingsSafe("RenderShadowOffsetError");
+	connectRefreshCachedSettingsSafe("RenderShadowBiasError");
+	connectRefreshCachedSettingsSafe("RenderShadowOffset");
+	connectRefreshCachedSettingsSafe("RenderShadowBias");
+	connectRefreshCachedSettingsSafe("RenderSpotShadowOffset");
+	connectRefreshCachedSettingsSafe("RenderSpotShadowBias");
+	connectRefreshCachedSettingsSafe("RenderEdgeDepthCutoff");
+	connectRefreshCachedSettingsSafe("RenderEdgeNormCutoff");
+	connectRefreshCachedSettingsSafe("RenderShadowGaussian");
+	connectRefreshCachedSettingsSafe("RenderShadowBlurDistFactor");
+	connectRefreshCachedSettingsSafe("RenderDeferredAtmospheric");
+	connectRefreshCachedSettingsSafe("RenderReflectionDetail");
+	connectRefreshCachedSettingsSafe("RenderHighlightFadeTime");
+	connectRefreshCachedSettingsSafe("RenderShadowClipPlanes");
+	connectRefreshCachedSettingsSafe("RenderShadowOrthoClipPlanes");
+	connectRefreshCachedSettingsSafe("RenderShadowNearDist");
+	connectRefreshCachedSettingsSafe("RenderFarClip");
+	connectRefreshCachedSettingsSafe("RenderShadowSplitExponent");
+	connectRefreshCachedSettingsSafe("RenderShadowErrorCutoff");
+	connectRefreshCachedSettingsSafe("RenderShadowFOVCutoff");
+	connectRefreshCachedSettingsSafe("CameraOffset");
+	connectRefreshCachedSettingsSafe("CameraMaxCoF");
+	connectRefreshCachedSettingsSafe("CameraDoFResScale");
+	connectRefreshCachedSettingsSafe("RenderAutoHideSurfaceAreaLimit");
 	gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
 }
 
@@ -720,7 +731,7 @@ void LLPipeline::destroyGL()
 	{
 		glDeleteQueriesARB(1, &mMeshDirtyQueryObject);
 		mMeshDirtyQueryObject = 0;
-}
+	}
 }
 
 static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture");
@@ -879,7 +890,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 			U32 sun_shadow_map_width = ((U32(resX*scale)+1)&~1); // must be even to avoid a stripe in the horizontal shadow blur
 			for (U32 i = 0; i < 4; i++)
 			{
-				if (!mShadow[i].allocate(sun_shadow_map_width,U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
+				if (!mShadow[i].allocate(sun_shadow_map_width,U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_TEXTURE)) return false;
 			}
 		}
 		else
@@ -1848,6 +1859,10 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
 		drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED);
 		if (done)
 		{
+			if (drawablep->isRoot())
+			{
+				drawablep->makeStatic();
+			}
 			drawablep->clearState(LLDrawable::ON_MOVE_LIST);
 			if (drawablep->isState(LLDrawable::ANIMATED_CHILD))
 			{ //will likely not receive any future world matrix updates
@@ -3472,7 +3487,7 @@ void LLPipeline::postSort(LLCamera& camera)
 	rebuildPriorityGroups();
 	llpushcallstacks ;
 
-
+	
 	//build render map
 	for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
 	{
@@ -3544,7 +3559,7 @@ void LLPipeline::postSort(LLCamera& camera)
 			}
 		}
 	}
-		
+	
 	//flush particle VB
 	LLVOPartGroup::sVB->flush();
 
@@ -6723,10 +6738,10 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
 		LLFace* facep = drawable->getFace(i);
 		if (facep)
 		{
-		facep->clearVertexBuffer();
+			facep->clearVertexBuffer();
+		}
 	}
 }
-}
 
 void LLPipeline::resetVertexBuffers()
 {
@@ -6765,6 +6780,8 @@ void LLPipeline::doResetVertexBuffers()
 
 	gSky.resetVertexBuffers();
 
+	LLVOPartGroup::destroyGL();
+
 	if ( LLPathingLib::getInstance() )
 	{
 		LLPathingLib::getInstance()->cleanupVBOManager();
@@ -7099,15 +7116,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
 				}
 				else
 				{
-					LLViewerObject* obj = gAgentCamera.getFocusObject();
-					if (obj)
-					{ //focus on alt-zoom target
-						focus_point = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal());
-					}
-					else
-					{ //focus on your avatar
-						focus_point = gAgent.getPositionAgent();
-					}
+					//focus on alt-zoom target
+					focus_point = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal());
 				}
 			}
 
@@ -7608,7 +7618,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
 
 	for (U32 i = 0; i < 4; i++)
 	{
-		channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE);
+		channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_TEXTURE);
 		stop_glerror();
 		if (channel > -1)
 		{
@@ -7618,8 +7628,8 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
 			gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
 			stop_glerror();
 			
-			glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
-			glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);
+			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
+			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);
 			stop_glerror();
 		}
 	}
@@ -7699,13 +7709,13 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
 								matrix_nondiag, matrix_nondiag, matrix_diag};
 	shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_SSAO_EFFECT_MAT, 1, GL_FALSE, ssao_effect_mat);
 
-	F32 shadow_offset_error = 1.f + RenderShadowOffsetError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
-	F32 shadow_bias_error = 1.f + RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
+	//F32 shadow_offset_error = 1.f + RenderShadowOffsetError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
+	F32 shadow_bias_error = RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2])/3000.f;
 
 	shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
 	shader.uniform1f(LLShaderMgr::DEFERRED_NEAR_CLIP, LLViewerCamera::getInstance()->getNear()*2.f);
-	shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset*shadow_offset_error);
-	shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, RenderShadowBias*shadow_bias_error);
+	shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset); //*shadow_offset_error);
+	shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, RenderShadowBias+shadow_bias_error);
 	shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_OFFSET, RenderSpotShadowOffset);
 	shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_BIAS, RenderSpotShadowBias);	
 
@@ -7996,7 +8006,7 @@ void LLPipeline::renderDeferredLighting()
 				}
 
 				mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
-
+				
 				LLGLDepthTest depth(GL_TRUE, GL_FALSE);
 				for (LLDrawable::drawable_set_t::iterator iter = mLights.begin(); iter != mLights.end(); ++iter)
 				{
@@ -8042,7 +8052,7 @@ void LLPipeline::renderDeferredLighting()
 					}
 
 					sVisibleLightCount++;
-
+										
 					if (camera->getOrigin().mV[0] > c[0] + s + 0.2f ||
 						camera->getOrigin().mV[0] < c[0] - s - 0.2f ||
 						camera->getOrigin().mV[1] > c[1] + s + 0.2f ||
@@ -8429,9 +8439,9 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
 
 	for (U32 i = 0; i < 4; i++)
 	{
-		if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE) > -1)
+		if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1)
 		{
-			glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
+			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
 		}
 	}
 
@@ -8848,6 +8858,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
 		gGL.setColorMask(false, false);
 	
 		LLFastTimer ftm(FTM_SHADOW_SIMPLE);
+		
 		gGL.getTexUnit(0)->disable();
 		for (U32 i = 0; i < sizeof(types)/sizeof(U32); ++i)
 		{
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 368be1c14dd639e5ed261063c5ef7a05f3c1a627..0140e24d636bbb3abfd70ccdf6b07c75a51a8bfd 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -382,6 +382,7 @@ class LLPipeline
 	BOOL updateDrawableGeom(LLDrawable* drawable, BOOL priority);
 	void assertInitializedDoError();
 	bool assertInitialized() { const bool is_init = isInit(); if (!is_init) assertInitializedDoError(); return is_init; };
+	void connectRefreshCachedSettingsSafe(const std::string name);
 	void hideDrawable( LLDrawable *pDrawable );
 	void unhideDrawable( LLDrawable *pDrawable );
 public:
diff --git a/indra/newview/skins/default/xui/en/floater_top_objects.xml b/indra/newview/skins/default/xui/en/floater_top_objects.xml
index 4dfdcd15c7950962552947b3c8e918317cd26e3f..0b71177345375f2dab46f175ba78cd86597e7f59 100644
--- a/indra/newview/skins/default/xui/en/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/en/floater_top_objects.xml
@@ -2,7 +2,7 @@
 <floater
  legacy_header_height="18"
  can_resize="true"
- height="350"
+ height="372"
  layout="topleft"
  min_height="300"
  min_width="450"
@@ -22,10 +22,6 @@
      name="scripts_score_label">
         Time
     </floater.string>
-    <floater.string
-     name="scripts_mono_time_label">
-        Mono Time
-    </floater.string>
     <floater.string
      name="top_colliders_title">
         Top Colliders
@@ -68,31 +64,35 @@
         <scroll_list.columns
          label="Score"
          name="score"
-         width="55" />
+         width="45" />
         <scroll_list.columns
          label="Name"
          name="name"
-         width="140" />
+         width="130" />
         <scroll_list.columns
          label="Owner"
          name="owner"
-         width="105" />
+         width="100" />
         <scroll_list.columns
          label="Location"
          name="location"
-         width="130" />
+         width="120" />
+        <scroll_list.columns
+         label="Parcel"
+         name="parcel"
+         width="120" />
         <scroll_list.columns
          label="Time"
          name="time"
-         width="150" />
-        <scroll_list.columns
-         label="Mono Time"
-         name="mono_time"
-         width="100" />
+         width="130" />
           <scroll_list.columns
           	label="URLs"
           	name="URLs"
-          	width="100" />
+         width="40" />
+        <scroll_list.columns
+         label="Memory (KB)"
+         name="memory"
+         width="40" />
 		<scroll_list.commit_callback
           function="TopObjects.CommitObjectsList" />
     </scroll_list>
@@ -193,6 +193,38 @@
       <button.commit_callback
           function="TopObjects.GetByOwnerName" />
     </button>
+    <text
+     type="string"
+     length="1"
+     follows="left|bottom"
+     height="20"
+     layout="topleft"
+     left="10"
+     top_pad="5"
+     name="parcel_name_text"
+     width="107">
+        Parcel:
+    </text>
+    <line_editor
+     follows="left|bottom|right"
+     height="20"
+     layout="topleft"
+     left_pad="3"
+     name="parcel_name_editor"
+     top_delta="-3"
+     width="568" />
+    <button
+     follows="bottom|right"
+     height="23"
+     label="Filter"
+     layout="topleft"
+     left_pad="5"
+     name="filter_parcel_btn"
+     top_delta="0"
+     width="100">
+      <button.commit_callback
+          function="TopObjects.GetByParcelName" />
+    </button>
     <button
      follows="bottom|right"
      height="22"
diff --git a/indra/newview/skins/default/xui/en/panel_group_invite.xml b/indra/newview/skins/default/xui/en/panel_group_invite.xml
index cd834b61ce61230dd06315d08cc65502696aaac7..124c0596c3d4857827b4ac3e55bbf776bfaa9598 100644
--- a/indra/newview/skins/default/xui/en/panel_group_invite.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_invite.xml
@@ -19,6 +19,10 @@
      name="already_in_group">
         Some Residents you chose are already in the group, and so were not sent an invitation.
     </panel.string>
+	<panel.string
+     name="invite_selection_too_large">
+		Group Invitations not sent: too many Residents selected. Group Invitations are limited to 100 per request.
+	</panel.string>
     <text
      type="string"
      length="1"
diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml
index 455060313497be93cafe3d651a9300c9040b238d..a4883c21e25e99d71913f9bc42da4682b66da834 100644
--- a/indra/newview/skins/default/xui/en/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml
@@ -194,7 +194,7 @@
     <button
      follows="left|top"
      height="20"
-     label="Delay Restart"
+     label="Cancel Restart"
      layout="topleft"
      left_pad="155"
      name="cancel_restart_btn"
diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml
index 49af1a87e1a92740b05090a9ea501723d33a0d45..c86f31b4293eb0ff5b391c89eb152f87d8794d0a 100644
--- a/indra/newview/skins/default/xui/fr/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml
@@ -134,7 +134,7 @@
 			<text name="DwellText">
 				Chargement...
 			</text>
-			<button label="Acheter du terrain" label_selected="Acheter le terrain..." left_delta="60" name="Buy Land..." width="125"/>
+			<button label="Acheter le terrain" label_selected="Acheter le terrain..." left_delta="60" name="Buy Land..." width="125"/>
 			<button label="Vente Linden" label_selected="Vente Linden..." name="Linden Sale..." tool_tip="Le terrain doit être la propriété d&apos;un résident, avoir un contenu défini et ne pas être aux enchères."/>
 			<button label="Infos sur les scripts" name="Scripts..." width="110"/>
 			<button label="Acheter pour le groupe" label_selected="Acheter pour le groupe..." name="Buy For Group..."/>
@@ -377,7 +377,7 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche.
 			</text>
 			<texture_picker label="" name="snapshot_ctrl" tool_tip="Cliquez pour sélectionner une image"/>
 			<text name="allow_label5">
-				Les avatars présents sur d&apos;autres parcelles peuvent voir et chatter avec les avatars présents sur cette parcelle.
+				Les avatars sur d&apos;autres parcelles peuvent voir et chatter avec les avatars sur cette parcelle.
 			</text>
 			<check_box label="Voir les avatars" name="SeeAvatarsCheck" tool_tip="Permettre aux avatars présents sur d&apos;autres parcelles de voir et chatter avec les avatars présents sur cette parcelle et à vous de les voir et de chatter avec eux."/>
 			<text name="landing_point">
diff --git a/indra/newview/skins/default/xui/fr/floater_camera.xml b/indra/newview/skins/default/xui/fr/floater_camera.xml
index f2b0ee8af3f49f29e0c4ac48c9a32be019978a5c..893e389f69412062b2908fd3ed7694f7ffd3043f 100644
--- a/indra/newview/skins/default/xui/fr/floater_camera.xml
+++ b/indra/newview/skins/default/xui/fr/floater_camera.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="camera_floater" title="PARAMÈTRES DE LA CAMÉRA">
+<floater name="camera_floater" title="CONTRÔLE DE LA CAMÉRA">
 	<floater.string name="rotate_tooltip">
 		Faire tourner la caméra autour du point central
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/fr/floater_edit_day_cycle.xml b/indra/newview/skins/default/xui/fr/floater_edit_day_cycle.xml
index 0100419bc53d07119bfa4cab227118b0e278fbc3..de1ba220a01138aa45ab5e630e5af17883794ce1 100644
--- a/indra/newview/skins/default/xui/fr/floater_edit_day_cycle.xml
+++ b/indra/newview/skins/default/xui/fr/floater_edit_day_cycle.xml
@@ -22,13 +22,13 @@
 		Remarque : si vous changez votre préréglage de nom, un nouveau préréglage sera créé et celui existant restera tel quel.
 	</text>
 	<text name="hint_item1">
-		- Cliquez sur un repère pour modifier le réglage du ciel et l&apos;heure associés.
+		- Modifier un réglage de ciel et d&apos;heure : clic sur le repère
 	</text>
 	<text name="hint_item2">
-		- Cliquez sur les repères et faites-les glisser afin de définir les heures de transition.
+		- Définir les heures de transition : clic et glissement des repères
 	</text>
 	<text name="hint_item3">
-		- Déplacez le marqueur en forme de triangle pour afficher un aperçu du cycle du jour.
+		- Afficher un aperçu du cycle du jour : déplacer le triangle
 	</text>
 	<panel name="day_cycle_slider_panel">
 		<multi_slider initial_value="0" name="WLTimeSlider"/>
@@ -91,11 +91,11 @@
 		</text>
 	</panel>
 	<text name="WLCurKeyPresetText">
-		Réglage du ciel :
+		Régl. ciel :
 	</text>
 	<combo_box label="Préréglage" name="WLSkyPresets"/>
 	<text name="WLCurKeyTimeText">
-		Heure :
+		H. :
 	</text>
 	<time name="time" value="6h"/>
 	<check_box label="Appliquer ce nouveau cycle du jour" name="make_default_cb"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_environment_settings.xml b/indra/newview/skins/default/xui/fr/floater_environment_settings.xml
index 9ea47a3dd719116335791d2ea1275aca3be805f8..ea12749d27c7042367109e630a556ea31cf9b1ed 100644
--- a/indra/newview/skins/default/xui/fr/floater_environment_settings.xml
+++ b/indra/newview/skins/default/xui/fr/floater_environment_settings.xml
@@ -18,7 +18,7 @@
 			<combo_box.item label="-Effectuer une sélection-" name="item0"/>
 		</combo_box>
 		<text name="sky_dayc_settings_title">
-			Ciel / Cycle du jour
+			Ciel/Cycle du jour
 		</text>
 		<radio_group name="sky_dayc_settings_radio_group">
 			<radio_item label="Ciel fixe" name="my_sky_settings"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_god_tools.xml b/indra/newview/skins/default/xui/fr/floater_god_tools.xml
index e4c53d866cd65e468d98baf58984f4bd661d2d90..0d21a8af32405eaa1e42ebd1a413de4d721ac842 100644
--- a/indra/newview/skins/default/xui/fr/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/fr/floater_god_tools.xml
@@ -71,8 +71,8 @@
 			<button label="Supprimer tous les objets scriptés de la cible sur les terrains des autres" label_selected="Supprimer tous les objets scriptés de la cible sur les terrains des autres" name="Delete Target&apos;s Scripted Objects On Others Land" tool_tip="Supprimer tous les objets scriptés appartenant à la cible sur les terrains ne lui appartenant pas. Les objets non copiables seront renvoyés."/>
 			<button label="Supprimer les objets scriptés de la cible sur *tous* les terrains" label_selected="Supprimer les objets scriptés de la cible sur *tous* les terrains" name="Delete Target&apos;s Scripted Objects On *Any* Land" tool_tip="Supprimer les objets scriptés appartenant à la cible dans cette région. Les objets non copiables seront renvoyés."/>
 			<button label="Supprimer *tous* les objets de la cible" label_selected="Supprimer *tous* les objets de la cible" name="Delete *ALL* Of Target&apos;s Objects" tool_tip="Supprimer tous les objets appartenant à la cible dans cette région. Les objets non copiables seront renvoyés."/>
-			<button label="Afficher les collisions les plus consommatrices" label_selected="Afficher les collisions les plus consommatrices" name="Get Top Colliders" tool_tip="Dresse une liste des objets avec les callbacks les plus fréquents. " width="300"/>
-			<button label="Afficher les objets scriptés les plus consommateurs" label_selected="Afficher les objets scriptés les plus consommateurs" name="Get Top Scripts" tool_tip="Dresse une liste des objets qui passent le plus de temps à exécuter des scripts." width="300"/>
+			<button label="Collisions les plus consommatrices" label_selected="Collisions les plus consommatrices" name="Get Top Colliders" tool_tip="Liste des objets avec les callbacks les plus fréquents. " width="300"/>
+			<button label="Scripts les plus consommateurs" label_selected="Scripts les plus consommateurs" name="Get Top Scripts" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts." width="300"/>
 			<button label="Résumé des scripts" label_selected="Résumé des scripts" name="Scripts digest" tool_tip="Dresse une liste des scripts et de leurs occurrences." width="300"/>
 		</panel>
 		<panel label="Requête" name="request">
diff --git a/indra/newview/skins/default/xui/fr/floater_land_holdings.xml b/indra/newview/skins/default/xui/fr/floater_land_holdings.xml
index 10fe132623cbf0a643c9b0a33e6f9d1102e2ddb7..ff728e3aaa83c245bbea1db29aff6e161a2bbafd 100644
--- a/indra/newview/skins/default/xui/fr/floater_land_holdings.xml
+++ b/indra/newview/skins/default/xui/fr/floater_land_holdings.xml
@@ -7,7 +7,7 @@
 		<column label="Surface" name="area"/>
 		<column label="" name="hidden"/>
 	</scroll_list>
-	<button label="Téléporter" label_selected="Téléporter" name="Teleport" tool_tip="Téléportez-vous au milieu de ce terrain."/>
+	<button label="Téléportation" label_selected="Téléportation" name="Teleport" tool_tip="Téléportez-vous au milieu de ce terrain."/>
 	<button label="Carte" label_selected="Carte" name="Show on Map" tool_tip="Afficher ce terrain sur la carte du monde"/>
 	<text name="contrib_label">
 		Vos contributions :
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_animation.xml b/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
index f2cb1d5e70eb0ade6fa6c54e65fbc74d1e4c9e2f..6488089c06729fc5084e0cbced7f2f4aba2bed1f 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
@@ -6,6 +6,6 @@
 	<text name="desc txt">
 		Description :
 	</text>
-	<button label="Exécuter dans Second Life" label_selected="Arrêter" name="Inworld" tool_tip="Lire cette animation de façon à ce que les autres la voient."/>
+	<button label="Exécuter dans SL" label_selected="Arrêter" name="Inworld" tool_tip="Lire cette animation de façon à ce que les autres la voient dans Second Life."/>
 	<button label="Exécuter localement" label_selected="Arrêter" name="Locally" tool_tip="Lire cette animation de façon à ce que vous soyez la seule personne à la voir."/>
 </floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml
index e21c6f4c08e78b30110e09d6461706aa09e8e09a..9643c51fb3ecb5c70543ea8b8209ae2c93be4705 100644
--- a/indra/newview/skins/default/xui/fr/floater_tools.xml
+++ b/indra/newview/skins/default/xui/fr/floater_tools.xml
@@ -99,7 +99,7 @@
 	<button label="" label_selected="" name="ToolRing" tool_tip="Anneau"/>
 	<button label="" label_selected="" name="ToolTree" tool_tip="Arbre"/>
 	<button label="" label_selected="" name="ToolGrass" tool_tip="Herbe"/>
-	<check_box label="Maintenir l&apos;outil sélectionné" name="checkbox sticky"/>
+	<check_box label="Maintenir l&apos;outil sélect." name="checkbox sticky"/>
 	<check_box label="Copier la sélection" name="checkbox copy selection"/>
 	<check_box initial_value="true" label="Centrer" name="checkbox copy centers"/>
 	<check_box label="Pivoter" name="checkbox copy rotates"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_top_objects.xml b/indra/newview/skins/default/xui/fr/floater_top_objects.xml
index 42352e7c1e9d8b8659d49c44ef0e7dec9f90d498..b40d585310b92e8728b65078be8a65c4b4fe6e6b 100644
--- a/indra/newview/skins/default/xui/fr/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/fr/floater_top_objects.xml
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="top_objects" title="Objets les plus utilisés">
 	<floater.string name="top_scripts_title">
-		Scripts principaux
+		Scripts les plus consommateurs
 	</floater.string>
 	<floater.string name="top_scripts_text">
 		[COUNT] scripts prenant un total de [TIME] ms
 	</floater.string>
 	<floater.string name="scripts_score_label">
-		Heure
+		Temps
 	</floater.string>
 	<floater.string name="scripts_mono_time_label">
-		Heure Mono
+		Temps Mono
 	</floater.string>
 	<floater.string name="top_colliders_title">
 		Collisions les plus consommatrices
@@ -32,8 +32,8 @@
 		<scroll_list.columns label="Nom" name="name"/>
 		<scroll_list.columns label="Propriétaire" name="owner"/>
 		<scroll_list.columns label="Lieu" name="location"/>
-		<scroll_list.columns label="Heure" name="time"/>
-		<scroll_list.columns label="Heure Mono" name="mono_time"/>
+		<scroll_list.columns label="Temps" name="time"/>
+		<scroll_list.columns label="Temps Mono" name="mono_time"/>
 		<scroll_list.columns label="URL" name="URLs"/>
 	</scroll_list>
 	<text name="id_text">
@@ -43,7 +43,7 @@
 	<text name="obj_name_text">
 		Nom :
 	</text>
-	<button label="Filtre" name="filter_object_btn"/>
+	<button label="Filtrer" name="filter_object_btn"/>
 	<text name="owner_name_text">
 		Propriétaire :
 	</text>
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index 2a26ed7a70d7d8b5a46999e52e2d835595497e7a..346b6ec2c7a568ad336b89c55f61ed50ebe96909 100644
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -8,7 +8,7 @@
 		<menu_item_call label="Nouvelle fenêtre d&apos;inventaire" name="NewInventoryWindow"/>
 		<menu_item_call label="Endroits..." name="Places"/>
 		<menu_item_call label="Favoris..." name="Picks"/>
-		<menu_item_call label="Paramètres de la caméra..." name="Camera Controls"/>
+		<menu_item_call label="Caméra..." name="Camera Controls"/>
 		<menu label="Déplacement" name="Movement">
 			<menu_item_call label="M&apos;asseoir" name="Sit Down Here"/>
 			<menu_item_check label="Voler" name="Fly"/>
@@ -171,7 +171,7 @@
 		</menu>
 		<menu label="Surbrillance et visibilité" name="Highlighting and Visibility">
 			<menu_item_check label="Balise animée" name="Cheesy Beacon"/>
-			<menu_item_check label="Cacher les particules" name="Hide Particles"/>
+			<menu_item_check label="Masquer les particules" name="Hide Particles"/>
 			<menu_item_check label="Masquer la sélection" name="Hide Selected"/>
 			<menu_item_check label="Mettre la transparence en surbrillance" name="Highlight Transparent"/>
 			<menu_item_check label="Afficher les éléments HUD" name="Show HUD Attachments"/>
diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml
index 0cdfc61e8eff738b3b44be2e6d1807586120f971..729c06b50f56cd60d7385366e113d87ef9e84c82 100644
--- a/indra/newview/skins/default/xui/fr/notifications.xml
+++ b/indra/newview/skins/default/xui/fr/notifications.xml
@@ -1314,7 +1314,7 @@ Dépasse la limite fixée à [MAX_AGENTS] [LIST_TYPE] de [NUM_EXCESS].
 Veuillez choisir un objet à vendre et réessayer.
 	</notification>
 	<notification name="FinishedRawDownload">
-		Chargement du fichier de terrain raw effectué vers :
+		Téléchargement du fichier de terrain raw effectué vers :
 [DOWNLOAD_PATH].
 	</notification>
 	<notification name="DownloadWindowsMandatory">
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_move.xml b/indra/newview/skins/default/xui/fr/panel_preferences_move.xml
index 94d7322b228687355a96f59fb224516750dd54b2..80aed90a2d3599842d311d267b72a02655c8b6ad 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_move.xml
@@ -28,7 +28,7 @@
 		<combo_box.item label="Déplacement vers le clic" name="1"/>
 	</combo_box>
 	<text name="double_click_action_lbl">
-		Double-clic sur le terrain :
+		Double clic sur le terrain :
 	</text>
 	<combo_box name="double_click_action_combo">
 		<combo_box.item label="Aucune action" name="0"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_debug.xml b/indra/newview/skins/default/xui/fr/panel_region_debug.xml
index 733c3f9a22cfb716f9cb1a36c46194c5ea880e7d..6ea4b6007292af6bdbb4cc228e2feb00c65d1bcd 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_debug.xml
@@ -30,9 +30,9 @@
 	<check_box label="Sur le terrain d&apos;un autre résident" name="return_other_land" tool_tip="Ne renvoyer que les objets se trouvant sur le terrain de quelqu&apos;un d&apos;autre"/>
 	<check_box label="Dans toutes les régions de ce domaine" name="return_estate_wide" tool_tip="Renvoyer les objets dans toutes les régions qui constituent ce domaine"/>
 	<button label="Renvoyer" name="return_btn"/>
-	<button label="Afficher les collisions les plus consommatrices..." name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/>
+	<button label="Collisions les plus consommatrices" name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/>
 	<button label="?" left="337" name="top_colliders_help"/>
-	<button label="Afficher les objets scriptés les plus consommateurs..." name="top_scripts_btn" tool_tip="Liste des objets qui passent le plus de temps à exécuter des scripts" width="320"/>
+	<button label="Scripts les plus consommateurs" name="top_scripts_btn" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts" width="320"/>
 	<button label="?" left="337" name="top_scripts_help"/>
 	<button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" width="160"/>
 	<button label="?" left="177" name="restart_help"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_environment.xml b/indra/newview/skins/default/xui/fr/panel_region_environment.xml
index d18503db86404a87d1e195ddb2eec3da2e8d7868..085a30878691ef15b9691eda57f195668ae4b34f 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_environment.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_environment.xml
@@ -15,7 +15,7 @@
 			<combo_box.item label="-Effectuer une sélection-" name="item0"/>
 		</combo_box>
 		<text name="sky_dayc_settings_title">
-			Ciel / Cycle du jour
+			Ciel/Cycle du jour
 		</text>
 		<radio_group name="sky_dayc_settings_radio_group">
 			<radio_item label="Ciel fixe" name="my_sky_settings"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_general.xml b/indra/newview/skins/default/xui/fr/panel_region_general.xml
index b5795bebe2917c4d3f50f026cdf8511ece15f7d2..234d31606951f72330dd39a4eff935f91bbce4d9 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_general.xml
@@ -22,7 +22,7 @@
 	<check_box label="Interdire le vol" name="block_fly_check"/>
 	<check_box label="Autoriser les dégâts" name="allow_damage_check"/>
 	<check_box label="Interdire les bousculades" name="restrict_pushobject"/>
-	<check_box label="Autoriser la revente" name="allow_land_resell_check"/>
+	<check_box label="Autoriser la revente de terrain" name="allow_land_resell_check"/>
 	<check_box label="Autoriser la fusion/division" name="allow_parcel_changes_check"/>
 	<check_box label="Ne pas afficher dans la recherche" name="block_parcel_search_check" tool_tip="Afficher cette région et ses parcelles dans les résultats de recherche"/>
 	<check_box label="Autoriser les objets de maillage" name="mesh_rez_enabled_check" tool_tip="Laisser les gens rezzer des objets de maillage dans cette région."/>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_terrain.xml b/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
index d7e321d06d772635ff3d14922471a0dab22c5a30..97f486d3a3dd0969abe776f12a0c67d7d9c80b0e 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
@@ -55,8 +55,8 @@ du terrain" name="terrain_lower_spin"/>
 	<spinner label="Bas" name="height_start_spin_2"/>
 	<spinner label="Haut" name="height_range_spin_0"/>
 	<spinner label="Haut" name="height_range_spin_2"/>
-	<button label="Télécharger le terrain au format RAW..." name="download_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/>
-	<button label="Charger le terrain au format RAW..." name="upload_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/>
+	<button label="Télécharger le terrain en RAW..." name="download_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/>
+	<button label="Charger un terrain en RAW..." name="upload_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/>
 	<button label="Figer le terrain" name="bake_terrain_btn" tool_tip="Définir le terrain actuel comme point central pour les limites d&apos;élévation/abaissement"/>
 	<button label="Appliquer" name="apply_btn"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml
index 4454d2475ef1e8a8b165927930c66c2897195c0d..f40bcec9089b94af4171ba817126c5817cba8c58 100644
--- a/indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/panel_snapshot_inventory.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel name="panel_snapshot_inventory">
 	<text name="title">
-		Enregistrer dans mon inventaire
+		Enregistrer dans l&apos;inventaire
 	</text>
 	<text name="hint_lbl">
 		L&apos;enregistrement d&apos;une image dans votre inventaire coûte [UPLOAD_COST] L$. Pour enregistrer votre image sous forme de texture, sélectionnez l&apos;un des formats carrés.
diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_local.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_local.xml
index 41264521fd7c0f096750ae17c0e27ecf2f79a93d..48ccacb37429d8fb73c87b5b6c6ad779bf430053 100644
--- a/indra/newview/skins/default/xui/fr/panel_snapshot_local.xml
+++ b/indra/newview/skins/default/xui/fr/panel_snapshot_local.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel name="panel_snapshot_local">
 	<text name="title">
-		Enregistrer sur mon ordinateur
+		Enregistrer sur l&apos;ordinateur
 	</text>
 	<combo_box label="Résolution" name="local_size_combo">
 		<combo_box.item label="Fenêtre actuelle" name="CurrentWindow"/>
@@ -25,7 +25,7 @@
 				<combo_box.item label="JPEG" name="JPEG"/>
 				<combo_box.item label="BMP (sans perte)" name="BMP"/>
 			</combo_box>
-			<slider label="Qualité de l&apos;image" name="image_quality_slider"/>
+			<slider label="Qualité d&apos;image" name="image_quality_slider"/>
 			<text name="image_quality_level">
 				([QLVL])
 			</text>
diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_options.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_options.xml
index db3fcbeac9cf2a31d2548a1fd68e64a86d686ad9..befe1b3bc668a12f4589218dee2143d7624ed337 100644
--- a/indra/newview/skins/default/xui/fr/panel_snapshot_options.xml
+++ b/indra/newview/skins/default/xui/fr/panel_snapshot_options.xml
@@ -2,6 +2,6 @@
 <panel name="panel_snapshot_options">
 	<button label="Publier sur le flux de mon profil" name="save_to_profile_btn"/>
 	<button label="Envoyer par e-mail" name="save_to_email_btn"/>
-	<button label="Enregistrer dans mon inventaire ([AMOUNT] L$)" name="save_to_inventory_btn"/>
-	<button label="Enregistrer sur mon ordinateur" name="save_to_computer_btn"/>
+	<button label="Enreg. dans l&apos;inventaire ([AMOUNT] L$)" name="save_to_inventory_btn"/>
+	<button label="Enreg. sur l&apos;ordinateur" name="save_to_computer_btn"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml
index bb23b5285078a73d67ad0ad5366cff3edecdd1b4..82a4815144e6cb73af7387c3e59e32946cf4b9cb 100644
--- a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml
+++ b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml
@@ -10,7 +10,7 @@
 		Envoi en cours...
 	</string>
 	<text name="title">
-		Envoyer par e-mail
+		E-mail
 	</text>
 	<button label="Message" name="message_btn"/>
 	<button label="Paramètres" name="settings_btn"/>