From dfe5470e06bc2b567cf21f1e3bea24567e901094 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 20 Feb 2010 12:42:59 +0000 Subject: [PATCH] added server and client timing data to r_speeds 2 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9989 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 5 +++-- host.c | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cl_screen.c b/cl_screen.c index 9553a873..8e727ecf 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -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 f579dd91..9d2f534c 100644 --- 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; -- 2.39.2