]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added server and client timing data to r_speeds 2
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 20 Feb 2010 12:42:59 +0000 (12:42 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 20 Feb 2010 12:42:59 +0000 (12:42 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9989 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
host.c

index 9553a873e859c400b5ec75db2f6f910877418073..8e727ecf0cbb0c90757bfa9408dea897ef8304fe 100644 (file)
@@ -1551,8 +1551,6 @@ void SCR_DrawScreen (void)
 
        R_Mesh_Start();
 
-       R_TimeReport_BeginFrame();
-
        R_UpdateVariables();
 
        // Quake uses clockwise winding, so these are swapped
@@ -1703,7 +1701,10 @@ void SCR_DrawScreen (void)
                R_TimeReport("2d");
 
        if (cls.signon == SIGNONS)
+       {
                R_TimeReport_EndFrame();
+               R_TimeReport_BeginFrame();
+       }
 
        DrawQ_Finish();
 
diff --git a/host.c b/host.c
index f579dd91af3752287d9e3cddeb8351f4e797a29f..9d2f534c163d4840a2b2983ce2d99076bfec2fa9 100644 (file)
--- a/host.c
+++ b/host.c
@@ -702,6 +702,7 @@ void Host_Main(void)
                        // process console commands
                        CL_VM_PreventInformationLeaks();
                        Cbuf_Execute();
+                       R_TimeReport("console");
                }
 
                //Con_Printf("%6.0f %6.0f\n", cl_timer * 1000000.0, sv_timer * 1000000.0);
@@ -812,6 +813,7 @@ void Host_Main(void)
                                if (framelimit > 1 && Sys_DoubleTime() >= aborttime)
                                        break;
                        }
+                       R_TimeReport("serverphysics");
 
                        // send all messages to the clients
                        SV_SendClientMessages();
@@ -826,6 +828,7 @@ void Host_Main(void)
 
                        // send an heartbeat if enough time has passed since the last one
                        NetConn_Heartbeat(0);
+                       R_TimeReport("servernetwork");
                }
 
        //-------------------
@@ -836,6 +839,7 @@ void Host_Main(void)
 
                if (cls.state != ca_dedicated && (cl_timer > 0 || cls.timedemo || ((vid_activewindow ? cl_maxfps : cl_maxidlefps).value < 1)))
                {
+                       R_TimeReport("---");
                        // decide the simulation time
                        if (cls.capturevideo.active)
                        {
@@ -910,6 +914,8 @@ void Host_Main(void)
                        CL_Video_Frame();
                        CL_Gecko_Frame();
 
+                       R_TimeReport("client");
+
                        CL_UpdateScreen();
 
                        if (host_speeds.integer)
@@ -925,6 +931,7 @@ void Host_Main(void)
                                S_Update(&r_refdef.view.matrix);
 
                        CDAudio_Update();
+                       R_TimeReport("audio");
 
                        // reset gathering of mouse input
                        in_mouse_x = in_mouse_y = 0;