diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 4b54f51f3025af99bc5b325a0d62d5b430087c5f..1c4a9ffaae7ad17e7246292c54f69e31b5fba9d5 100755
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -51,9 +51,15 @@ U32 wpo2(U32 i);
 
 U32 LLImageGL::sUniqueCount				= 0;
 U32 LLImageGL::sBindCount				= 0;
+#if defined(_WIN64) || defined(__amd64__) || defined(__x86_64__)
+S64Bytes LLImageGL::sGlobalTextureMemory(0);
+S64Bytes LLImageGL::sBoundTextureMemory(0);
+S64Bytes LLImageGL::sCurBoundTextureMemory(0);
+#else
 S32Bytes LLImageGL::sGlobalTextureMemory(0);
 S32Bytes LLImageGL::sBoundTextureMemory(0);
 S32Bytes LLImageGL::sCurBoundTextureMemory(0);
+#endif
 S32 LLImageGL::sCount					= 0;
 
 BOOL LLImageGL::sGlobalUseAnisotropic	= FALSE;
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 4e5940ae6569d2bb741398104668f4dddd36a78d..ccd549f7ab534b55cb347f4e8667040a031aa488 100755
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -230,9 +230,15 @@ public:
 	static F32 sLastFrameTime;
 
 	// Global memory statistics
+#if defined(_WIN64) || defined(__amd64__) || defined(__x86_64__)
+	static S64Bytes sGlobalTextureMemory;	// Tracks main memory texmem
+	static S64Bytes sBoundTextureMemory;	// Tracks bound texmem for last completed frame
+	static S64Bytes sCurBoundTextureMemory;		// Tracks bound texmem for current frame
+#else
 	static S32Bytes sGlobalTextureMemory;	// Tracks main memory texmem
 	static S32Bytes sBoundTextureMemory;	// Tracks bound texmem for last completed frame
 	static S32Bytes sCurBoundTextureMemory;		// Tracks bound texmem for current frame
+#endif
 	static U32 sBindCount;					// Tracks number of texture binds for current frame
 	static U32 sUniqueCount;				// Tracks number of unique texture binds for current frame
 	static BOOL sGlobalUseAnisotropic;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 3c0a4cf4c8187a15a7b62a210a28035c61de099c..0ea7fa8b392eb6b778087dcb3acf6db4c75f4067 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -66,7 +66,7 @@
 // extern
 const S32Megabytes gMinVideoRam(32);
 #if defined(_WIN64) || defined(__amd64__) || defined(__x86_64__)
-const S32Megabytes gMaxVideoRam(1024);
+const S32Megabytes gMaxVideoRam(2048);
 #else
 const S32Megabytes gMaxVideoRam(512);
 #endif
@@ -90,11 +90,15 @@ S32 LLViewerTexture::sAuxCount = 0;
 LLFrameTimer LLViewerTexture::sEvaluationTimer;
 F32 LLViewerTexture::sDesiredDiscardBias = 0.f;
 F32 LLViewerTexture::sDesiredDiscardScale = 1.1f;
-S32Bytes LLViewerTexture::sBoundTextureMemory;
-S32Bytes LLViewerTexture::sTotalTextureMemory;
 S32Megabytes LLViewerTexture::sMaxBoundTextureMemory;
 S32Megabytes LLViewerTexture::sMaxTotalTextureMem;
+#if defined(_WIN64) || defined(__amd64__) || defined(__x86_64__)
+S64Bytes LLViewerTexture::sBoundTextureMemory;
+S64Bytes LLViewerTexture::sTotalTextureMemory;
+S64Bytes LLViewerTexture::sMaxDesiredTextureMem;
+#else
 S32Bytes LLViewerTexture::sMaxDesiredTextureMem;
+#endif
 S8  LLViewerTexture::sCameraMovingDiscardBias = 0;
 F32 LLViewerTexture::sCameraMovingBias = 0.0f;
 S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size
@@ -539,7 +543,11 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
 	sTotalTextureMemory = LLImageGL::sGlobalTextureMemory;
 	sMaxBoundTextureMemory = gTextureList.getMaxResidentTexMem();
 	sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem();
+#if defined(_WIN64) || defined(__amd64__) || defined(__x86_64__)
+	sMaxDesiredTextureMem = S64Megabytes(sMaxTotalTextureMem); //in Bytes, by default and when total used texture memory is small.
+#else
 	sMaxDesiredTextureMem = sMaxTotalTextureMem; //in Bytes, by default and when total used texture memory is small.
+#endif
 
 	if (sBoundTextureMemory >= sMaxBoundTextureMemory ||
 		sTotalTextureMemory >= sMaxTotalTextureMem)
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 5240b52c0c7745639643b0b544c62060e8ed5f90..d433bd4dd24567b9d72c9d31a77b65d1b21ce04d 100755
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -211,11 +211,17 @@ public:
 	static LLFrameTimer sEvaluationTimer;
 	static F32 sDesiredDiscardBias;
 	static F32 sDesiredDiscardScale;
-	static S32Bytes sBoundTextureMemory;
-	static S32Bytes sTotalTextureMemory;
 	static S32Megabytes sMaxBoundTextureMemory;
 	static S32Megabytes sMaxTotalTextureMem;
-	static S32Bytes sMaxDesiredTextureMem ;
+#if defined(_WIN64) || defined(__amd64__) || defined(__x86_64__)
+	static S64Bytes sBoundTextureMemory;
+	static S64Bytes sTotalTextureMemory;
+	static S64Bytes sMaxDesiredTextureMem ;
+#else
+	static S32Bytes sBoundTextureMemory;
+	static S32Bytes sTotalTextureMemory;
+	static S32Bytes sMaxDesiredTextureMem;
+#endif
 	static S8  sCameraMovingDiscardBias;
 	static F32 sCameraMovingBias;
 	static S32 sMaxSculptRez ;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 3088eb2d6eac9618f881a786f188e04ca79773fc..1b92b6dc0bc06c14381cd6da853b018ce2441d78 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1331,6 +1331,11 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl
 
 	max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam); 
 	
+#if defined(_WIN64) || defined(__amd64__) || defined(__x86_64__)
+	if (get_recommended)
+		max_texmem = llmin(max_texmem, S32Megabytes(512));
+#endif
+
 	return max_texmem;
 }
 
@@ -1342,11 +1347,11 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem)
 	S32Megabytes cur_mem(gSavedSettings.getS32("TextureMemory"));
 	F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
 	S32Megabytes default_mem = getMaxVideoRamSetting(true, mem_multiplier); // recommended default
-	if (mem == (S32Bytes)0)
+	if (mem == (S32Megabytes)0)
 	{
-		mem = cur_mem > (S32Bytes)0 ? cur_mem : default_mem;
+		mem = cur_mem > (S32Megabytes)0 ? cur_mem : default_mem;
 	}
-	else if (mem < (S32Bytes)0)
+	else if (mem < (S32Megabytes)0)
 	{
 		mem = default_mem;
 	}
@@ -1397,6 +1402,8 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem)
 	
 	LL_INFOS() << "Total Video Memory set to: " << vb_mem << " MB" << LL_ENDL;
 	LL_INFOS() << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << LL_ENDL;
+	LL_INFOS() << "Total Texture Memory set to: " << mMaxTotalTextureMemInMegaBytes << " MB" << LL_ENDL;
+	LL_INFOS() << "Maxiumum Resident Texture Memory set to: " << mMaxResidentTexMemInMegaBytes << " MB" << LL_ENDL;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
index 4450edec467f8f44db8558522605e31ed98bc2c8..818bbadfa9e39c94a92c210813e28bc49b3a14fe 100755
--- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater
  legacy_header_height="18"
- height="224"
+ height="215"
  layout="topleft"
  name="Hardware Settings Floater"
  help_topic="hardware_settings_floater"
  title="HARDWARE SETTINGS"
- width="615">
+ width="525">
     <text
      type="string"
      length="1"
@@ -16,7 +16,7 @@
      left="10"
      name="Filtering:"
      top="20"
-     width="188">
+     width="148">
         Filtering:
     </text>
     <check_box
@@ -37,7 +37,7 @@
      left="10"
      name="antialiasing label"
      top_pad="5"
-     width="188">
+     width="148">
         Antialiasing:
     </text>
     <combo_box
@@ -92,7 +92,7 @@
      left="10"
      name="antialiasing label"
      top_pad="11"
-     width="188">
+     width="148">
         Vertical Sync:
     </text>
     <combo_box
@@ -138,7 +138,7 @@
      increment="0.01"
      initial_value="1"
      label="Gamma:"
-     label_width="198"
+     label_width="158"
      layout="topleft"
      left="10"
      max_val="2"
@@ -165,8 +165,8 @@
      layout="topleft"
      left="10"
      name="Enable VBO:"
-     top_pad="10"
-     width="188">
+     top_pad="13"
+     width="148">
         Enable VBO:
     </text>
     <check_box
@@ -187,8 +187,8 @@
     layout="topleft"
     left="10"
     name="tc label"
-    top_pad="10"
-    width="188">
+    top_pad="5"
+    width="148">
     Enable S3TC:
   </text>
     <check_box
@@ -202,6 +202,7 @@
      tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality."
      width="315" />
     <slider
+	 can_edit_text="true"
      control_name="TextureMemory"
      decimal_digits="0"
      follows="left|top"
@@ -209,14 +210,14 @@
      increment="16"
      initial_value="32"
      label="Texture Memory (MB):"
-     label_width="195"
+     label_width="148"
      layout="topleft"
      left="10"
-     max_val="4096"
+     max_val="2048"
      name="GraphicsCardTextureMemory"
      tool_tip="Amount of memory to allocate for textures. Defaults to video card memory. Reducing this may improve performance but may also make textures blurry."
-     top_pad="10"
-     width="360" />
+     top_pad="5"
+     width="460" />
     <spinner
      control_name="RenderFogRatio"
      decimal_digits="1"
@@ -224,14 +225,14 @@
      height="22"
      initial_value="4"
      label="Fog Distance Ratio:"
-     label_width="198"
+     label_width="158"
      layout="topleft"
      left_delta="0"
      max_val="10"
      min_val="0.5"
      name="fog"
-     top_pad="7"
-     width="262" />
+     top_pad="5"
+     width="222" />
     <button
      follows="right|bottom"
      height="22"
@@ -240,6 +241,6 @@
      layout="topleft"
      left="-102"
      name="OK"
-     top="192"
+     top="187"
      width="90" />
 </floater>