Commits

BaoLinden committed ab09f2c

fixed for EXT-8963: investigate if Advanced > Run Multiple Threads should be on.
Removed "Run Multiple Threads" from the menu because we are not using it.

  • Participants
  • Parent commits 8887f81

Comments (0)

Files changed (3)

indra/newview/app_settings/settings.xml

       <key>Value</key>
       <real>1.0</real>
     </map>
-    <key>RunMultipleThreads</key>
-    <map>
-      <key>Comment</key>
-      <string>If TRUE keep background threads active during render</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
     <key>SafeMode</key>
     <map>
       <key>Comment</key>

indra/newview/llappviewer.cpp

 static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads");
 static LLFastTimer::DeclareTimer FTM_IDLE("Idle");
 static LLFastTimer::DeclareTimer FTM_PUMP("Pump");
-static LLFastTimer::DeclareTimer FTM_PUMP_ARES("Ares");
-static LLFastTimer::DeclareTimer FTM_PUMP_SERVICE("Service");
-static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback");
-static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot");
-static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update");
 
 bool LLAppViewer::mainLoop()
 {
 						LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP);
 						pingMainloopTimeout("Main:ServicePump");				
 						LLFastTimer t4(FTM_PUMP);
-						{
-							LLFastTimer t(FTM_PUMP_ARES);
-							gAres->process();
-						}
-						{
-							LLFastTimer t(FTM_PUMP_SERVICE);
-							// this pump is necessary to make the login screen show up
-							gServicePump->pump();
-
-							{
-								LLFastTimer t(FTM_SERVICE_CALLBACK);
-								gServicePump->callback();
-							}
-						}
+						gAres->process();
+						// this pump is necessary to make the login screen show up
+						gServicePump->pump();
+						gServicePump->callback();
 					}
 					
 					resumeMainloopTimeout();
 			{
 				LLMemType mt_sleep(LLMemType::MTYPE_SLEEP);
 				LLFastTimer t2(FTM_SLEEP);
-				bool run_multiple_threads = gSavedSettings.getBOOL("RunMultipleThreads");
-
+				
 				// yield some time to the os based on command line option
 				if(mYieldTime >= 0)
 				{
 				}
 
 				static const F64 FRAME_SLOW_THRESHOLD = 0.5; //2 frames per seconds				
-				const F64 min_frame_time = 0.0; //(.0333 - .0010); // max video frame rate = 30 fps
-				const F64 min_idle_time = 0.0; //(.0010); // min idle time = 1 ms
-				const F64 max_idle_time = run_multiple_threads ? min_idle_time : llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second
+				const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second
 				idleTimer.reset();
 				bool is_slow = (frameTimer.getElapsedTimeF64() > FRAME_SLOW_THRESHOLD) ;
 				S32 total_work_pending = 0;
 
 					total_work_pending += work_pending ;
 					total_io_pending += io_pending ;
-					F64 frame_time = frameTimer.getElapsedTimeF64();
-					F64 idle_time = idleTimer.getElapsedTimeF64();
-					if (frame_time >= min_frame_time &&
-						idle_time >= min_idle_time &&
-						(!work_pending || idle_time >= max_idle_time))
+					
+					if (!work_pending || idleTimer.getElapsedTimeF64() >= max_idle_time)
 					{
 						break;
 					}
 				}
 
-				 // Prevent the worker threads from running while rendering.
-				// if (LLThread::processorCount()==1) //pause() should only be required when on a single processor client...
-				if (run_multiple_threads == FALSE)
+				if(!total_work_pending) //pause texture fetching threads if nothing to process.
 				{
-					//LLFastTimer ftm(FTM_PAUSE_THREADS); //not necessary.
-	 				
-					if(!total_work_pending) //pause texture fetching threads if nothing to process.
-					{
-						LLAppViewer::getTextureCache()->pause();
-						LLAppViewer::getImageDecodeThread()->pause();
-						LLAppViewer::getTextureFetch()->pause(); 
-					}
-					if(!total_io_pending) //pause file threads if nothing to process.
-					{
-						LLVFSThread::sLocal->pause(); 
-						LLLFSThread::sLocal->pause(); 
-					}
-				}					
+					LLAppViewer::getTextureCache()->pause();
+					LLAppViewer::getImageDecodeThread()->pause();
+					LLAppViewer::getTextureFetch()->pause(); 
+				}
+				if(!total_io_pending) //pause file threads if nothing to process.
+				{
+					LLVFSThread::sLocal->pause(); 
+					LLLFSThread::sLocal->pause(); 
+				}									
 
 				if ((LLStartUp::getStartupState() >= STATE_CLEANUP) &&
 					(frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD))
 			gAgent.moveYaw(-1.f);
 		}
 
-		{
-			LLFastTimer t(FTM_AGENT_AUTOPILOT);
-			// Handle automatic walking towards points
-			gAgentPilot.updateTarget();
-			gAgent.autoPilot(&yaw);
-		}
+	    // Handle automatic walking towards points
+	    gAgentPilot.updateTarget();
+	    gAgent.autoPilot(&yaw);
     
 	    static LLFrameTimer agent_update_timer;
 	    static U32 				last_control_flags;
 		    
 	    if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
 	    {
-		    LLFastTimer t(FTM_AGENT_UPDATE);
 		    // Send avatar and camera info
 		    last_control_flags = gAgent.getControlFlags();
 		    send_agent_update(TRUE);

indra/newview/skins/default/xui/en/menu_viewer.xml

             <menu_item_call.on_click
              function="BuyCurrency" />
         </menu_item_call>
-
         <menu_item_separator/>
-
         <menu_item_call
          label="My Profile"
          name="Profile">
             <menu_item_call.on_click
              function="Advanced.LeaveAdminStatus" />
         </menu_item_call>
-
         <menu_item_separator/>
-
         <menu_item_call
          label="Exit [APP_NAME]"
          name="Quit"
              function="SideTray.PanelPeopleTab"
              parameter="groups_panel" />
         </menu_item_call>
-
         <menu_item_separator/>
-
         <!--menu_item_call
          label="Chat"
          name="Chat">
              parameter="region_info" />
         </menu_item_call>
         </menu>
-
         <menu_item_separator/>
-
         <menu_item_call
              label="Buy This Land"
              name="Buy Land">
                control="NavBarShowParcelProperties" />
           </menu_item_check>
         </menu>
-
         <menu_item_separator/>
-
 	    <menu_item_call
 	     label="Teleport Home"
 	     name="Teleport Home"
              parameter="ShowNavbarFavoritesPanel" />
         </menu_item_check>
         <menu_item_separator/>-->
-
         <menu_item_separator/>
-
     <menu
          create_jump_keys="true"
          label="Sun"
                  function="World.EnvSettings"
                  parameter="default" />
             </menu_item_call>
-
             <menu_item_separator/>
-
             <menu_item_call
              label="Environment Editor"
              name="Environment Editor">
             </menu_item_call>
         </menu>
         <menu_item_separator/>
-
         <menu_item_call
            label="Focus on Selection"
            name="Focus on Selection"
           <menu_item_call.on_enable
              function="Tools.SomethingSelectedNoHUD" />
         </menu_item_call>
-
         <menu_item_separator/>
-
         <menu
          create_jump_keys="true"
          label="Object"
                function="EditableSelected" />
           </menu_item_call>
         </menu>
-
         <menu_item_separator/>
-
         <menu
          create_jump_keys="true"
          label="Options"
 				 function="ToggleControl"
 				 parameter="DebugPermissions" />
 			</menu_item_check>
-
             <menu_item_separator/>
-
             <menu_item_check
                  label="Select Only My Objects"
                  name="Select Only My Objects">
                     <menu_item_check.on_click
                      function="Tools.SelectBySurrounding" />
             </menu_item_check>
-
           <menu_item_separator/>
-
                 <menu_item_check
                  label="Show Hidden Selection"
                  name="Show Hidden Selection">
                      function="ToggleControl"
                      parameter="ShowSelectionBeam" />
                 </menu_item_check>
-
         <menu_item_separator/>
-
                 <menu_item_check
                  label="Snap to Grid"
                  name="Snap to Grid"
              function="Floater.Show"
              parameter="hud" />
         </menu_item_call>-->
-
         <menu_item_separator/>
-
         <menu_item_call
              label="Report Abuse"
              name="Report Abuse">
                  function="ShowHelp"
                  parameter="report_bug" />
             </menu_item_call>
-
         <menu_item_separator/>
-
         <menu_item_call
          label="About [APP_NAME]"
          name="About Second Life">
      name="Advanced"
      tear_off="true"
      visible="false">
+        <menu_item_check
+         label="Show Advanced Menu"
+         name="Show Advanced Menu"
+         shortcut="control|alt|shift|D">
+          <on_check
+           function="CheckControl"
+           parameter="UseDebugMenus" />
+          <on_click
+           function="ToggleControl"
+           parameter="UseDebugMenus" />
+        </menu_item_check>
         <menu_item_call
          label="Stop Animating Me"
          name="Stop Animating My Avatar">
            function="Floater.Show"
            parameter="window_size" />
         </menu_item_call>
-
         <menu_item_separator/>
-
         <menu_item_check
          label="Limit Select Distance"
          name="Limit Select Distance">
              function="ToggleControl"
              parameter="DisableCameraConstraints" />
         </menu_item_check>
-
         <menu_item_separator/>
-
         <menu_item_check
          label="High-res Snapshot"
          name="HighResSnapshot">
              function="ToggleControl"
              parameter="CompressSnapshotsToDisk" />
         </menu_item_check>
-
         <menu_item_separator/>
-
         <menu
          create_jump_keys="true"
          label="Performance Tools"
                 <menu_item_check.on_click
                  function="View.ShowHoverTips" />
             </menu_item_check>
-
             <menu_item_separator/>
-
             <menu_item_check
              label="Show Land Tooltips"
              name="Land Tips">
                  function="Advanced.ToggleFeature"
                  parameter="flexible" />
             </menu_item_check>
-        </menu>
-        <menu_item_check
-         label="Run Multiple Threads"
-         name="Run Multiple Threads">
-            <menu_item_check.on_check
-             function="CheckControl"
-             parameter="RunMultipleThreads" />
-            <menu_item_check.on_click
-             function="ToggleControl"
-             parameter="RunMultipleThreads" />
-        </menu_item_check>
+        </menu>        
         <menu_item_check
          label="Use Plugin Read Thread"
          name="Use Plugin Read Thread">
              function="ToggleControl"
              parameter="MouseSmooth" />
         </menu_item_check>
-
         <menu_item_separator/>
-
         <menu
          label="Shortcuts"
          name="Shortcuts"
                 <menu_item_call.on_click
                  function="View.DefaultUISize" />
             </menu_item_call>
-
+            <!-- This second, alternative shortcut for Show Advanced Menu is for backward compatibility.  The main shortcut has been changed so it's Linux-friendly, where the old shortcut is typically eaten by the window manager. -->
+            <menu_item_check
+               label="Show Advanced Menu - legacy shortcut"
+               name="Show Advanced Menu - legacy shortcut"
+               shortcut="control|alt|D">
+              <on_check
+		 function="CheckControl"
+		 parameter="UseDebugMenus" />
+              <on_click
+		 function="ToggleControl"
+		 parameter="UseDebugMenus" />
+            </menu_item_check>
             <menu_item_separator/>
-
             <menu_item_check
              label="Always Run"
              name="Always Run"
                 <menu_item_check.on_enable
                  function="Agent.enableFlying" />
             </menu_item_check>
-
             <menu_item_separator/>
-
             <menu_item_call
              label="Close Window"
              name="Close Window"
                 <menu_item_call.on_enable
                  function="File.EnableCloseAllWindows" />
             </menu_item_call>
-
             <menu_item_separator/>
-
             <menu_item_call
              label="Snapshot to Disk"
              name="Snapshot to Disk"
                 <menu_item_call.on_click
                  function="File.TakeSnapshotToDisk" />
             </menu_item_call>
-
             <menu_item_separator/>
-
             <menu_item_call
              label="Mouselook"
              name="Mouselook"
                 <menu_item_call.on_enable
                  function="View.EnableLastChatter" />
             </menu_item_call>
-
             <menu_item_separator/>
-
             <menu
              create_jump_keys="true"
              label="Select Build Tool"
                      parameter="land" />
                 </menu_item_call>
             </menu>
-
             <menu_item_separator/>
-
             <menu_item_call
              label="Zoom In"
              name="Zoom In"
                 <menu_item_call.on_click
                  function="View.ZoomOut" />
             </menu_item_call>
-            <menu_item_separator
-             visible="false"/>
-            <!-- Made invisible to avoid a dissonance: menu item toggle menu where it is located. EXT-8069.
-              Can't be removed to keep sortcut workable.
-            -->
-            <menu_item_check
-             label="Show Advanced Menu"
-             name="Show Advanced Menu"
-             shortcut="control|alt|D"
-             visible="false">
-                <on_check
-                 function="CheckControl"
-                 parameter="UseDebugMenus" />
-                <on_click
-                 function="ToggleControl"
-                 parameter="UseDebugMenus" />
-        </menu_item_check>
-        </menu> <!--Shortcuts-->
-
+        </menu>
         <menu_item_separator/>
-
         <menu_item_call
          label="Show Debug Settings"
          name="Debug Settings">
              function="ToggleControl"
              parameter="QAMode" />
         </menu_item_check>
-    
     </menu>
     <menu
      create_jump_keys="true"
                  function="Advanced.ToggleConsole"
                  parameter="memory view" />
             </menu_item_check>
-
             <menu_item_separator/>
-
             <menu_item_call
              label="Region Info to Debug Console"
              name="Region Info to Debug Console">
                  function="Advanced.DumpInfoToConsole"
                  parameter="capabilities" />
             </menu_item_call>
-
             <menu_item_separator/>
-
             <menu_item_check
              label="Camera"
              name="Camera">
                  function="ToggleControl"
                  parameter="DebugShowColor" />
             </menu_item_check>
-
             <menu_item_separator/>
-
             <menu_item_check
              label="Show Updates to Objects"
              name="Show Updates"
                  function="Advanced.ToggleShowObjectUpdates" />
             </menu_item_check>
         </menu>
-
         <menu_item_separator/>
-
         <menu
          create_jump_keys="true"
          label="Force an Error"
             <menu_item_check.on_enable
                  function="Advanced.EnableRenderFBO" />
            </menu_item_check>
-
-          <menu_item_separator />
-
           <menu_item_check
-                       label="Lighting and Shadows"
-                       name="Lighting and Shadows">
+                       label="Deferred Rendering"
+                       name="Deferred Rendering">
             <menu_item_check.on_check
              function="CheckControl"
              parameter="RenderDeferred" />
                  function="Advanced.EnableRenderDeferred" />
           </menu_item_check>
           <menu_item_check
-                       label="   Shadows from Sun/Moon/Projectors"
-                       name="Shadows from Sun/Moon/Projectors">
-            <menu_item_check.on_check
-             function="Advanced.CheckRenderShadowOption"
-             parameter="RenderShadowDetail" />
-            <menu_item_check.on_click
-             function="Advanced.ClickRenderShadowOption"
-             parameter="RenderShadowDetail" />
-            <menu_item_check.on_enable
-                 function="Advanced.EnableRenderDeferredOptions" />
-          </menu_item_check>
-          <menu_item_check
-                   label="   SSAO and Shadow Smoothing"
-                   name="SSAO and Shadow Smoothing">
-            <menu_item_check.on_check
-             function="CheckControl"
-             parameter="RenderDeferredSSAO" />
-            <menu_item_check.on_click
-             function="ToggleControl"
-             parameter="RenderDeferredSSAO" />
-            <menu_item_check.on_enable
-                 function="Advanced.EnableRenderDeferredOptions" />
-          </menu_item_check>
-          <menu_item_check
-                   label="   Global Illumination (experimental)"
+                   label="Global Illumination"
                    name="Global Illumination">
             <menu_item_check.on_check
              function="CheckControl"
              function="ToggleControl"
              parameter="RenderDeferredGI" />
             <menu_item_check.on_enable
-                 function="Advanced.EnableRenderDeferredOptions" />
+                 function="Advanced.EnableRenderDeferredGI" />
           </menu_item_check>
-
           <menu_item_separator />
-
           <menu_item_check
              label="Debug GL"
              name="Debug GL">
                  parameter="RenderDebugPipeline" />
             </menu_item_check>
             <menu_item_check
-             label="Automatic Alpha Masks (deferred)"
-             name="Automatic Alpha Masks (deferred)">
+             label="Fast Alpha"
+             name="Fast Alpha">
                 <menu_item_check.on_check
                  function="CheckControl"
-                 parameter="RenderAutoMaskAlphaDeferred" />
+                 parameter="RenderFastAlpha" />
                 <menu_item_check.on_click
                  function="ToggleControl"
-                 parameter="RenderAutoMaskAlphaDeferred" />
-            </menu_item_check>
-            <menu_item_check
-             label="Automatic Alpha Masks (non-deferred)"
-             name="Automatic Alpha Masks (non-deferred)">
-                <menu_item_check.on_check
-                 function="CheckControl"
-                 parameter="RenderAutoMaskAlphaNonDeferred" />
-                <menu_item_check.on_click
-                 function="ToggleControl"
-                 parameter="RenderAutoMaskAlphaNonDeferred" />
+                 parameter="RenderFastAlpha" />
             </menu_item_check>
             <menu_item_check
              label="Animation Textures"
                parameter="AuditTexture" />
             </menu_item_check>
             <menu_item_check
-             label="Texture Atlas (experimental)"
+             label="Texture Atlas"
              name="Texture Atlas">
               <menu_item_check.on_check
                function="CheckControl"
                  function="ToggleControl"
                  parameter="AgentPause" />
             </menu_item_check>
-
             <menu_item_separator/>
-
             <menu_item_call
              label="Enable Message Log"
              name="Enable Message Log">
                 <menu_item_call.on_click
                  function="Advanced.DisableMessageLog" />
             </menu_item_call>
-
             <menu_item_separator/>
-
             <menu_item_check
              label="Velocity Interpolate Objects"
              name="Velocity Interpolate Objects">
                  function="ToggleControl"
                  parameter="PingInterpolate" />
             </menu_item_check>
-
             <menu_item_separator/>
-
             <menu_item_call
              label="Drop a Packet"
              name="Drop a Packet"
             </menu_item_check>
 
             <menu_item_separator />
-
             <menu_item_check
              label="Debug SelectMgr"
              name="Debug SelectMgr">
                  function="Advanced.DumpAvatarLocalTextures" />
             </menu_item_call>
         </menu>
-
         <menu_item_separator/>
-
         <menu_item_check
          label="HTTP Textures"
          name="HTTP Textures">
              function="ToggleControl"
              parameter="ShowConsoleWindow" />
         </menu_item_check>
-
         <menu_item_separator/>
-
         <menu_item_check
          label="Show Admin Menu"
          name="View Admin Options">
                      name="PublicIssueTrackerHelp_url"
                      parameter="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker" />
                 </menu_item_call>
-
                 <menu_item_separator/>
-
                 <menu_item_call
                  label="Bug Reporting 101"
                  name="Bug Reporing 101">