changed r_speeds labels again, less csqc monitoring and more consistent
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 27 Feb 2010 18:31:15 +0000 (18:31 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 27 Feb 2010 18:31:15 +0000 (18:31 +0000)
label order from frame to frame

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10027 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
clvm_cmds.c
gl_rmain.c
host.c
netconn.c
snd_main.c
snd_win.c

index 57941d3..26cbc6f 100644 (file)
@@ -3630,7 +3630,7 @@ void CL_ParseServerMessage(void)
 
                        if (cmd == -1)
                        {
-                               R_TimeReport("END OF MESSAGE");
+//                             R_TimeReport("END OF MESSAGE");
                                SHOWNET("END OF MESSAGE");
                                break;          // end of message
                        }
@@ -4075,19 +4075,19 @@ void CL_ParseServerMessage(void)
                                CL_ParsePointParticles1();
                                break;
                        }
-                       R_TimeReport(svc_strings[cmd]);
+//                     R_TimeReport(svc_strings[cmd]);
                }
        }
 
        if (cls.signon == SIGNONS)
                CL_UpdateItemsAndWeapon();
-       R_TimeReport("UpdateItems");
+//     R_TimeReport("UpdateItems");
 
        EntityFrameQuake_ISeeDeadEntities();
-       R_TimeReport("ISeeDeadEntities");
+//     R_TimeReport("ISeeDeadEntities");
 
        CL_UpdateMoveVars();
-       R_TimeReport("UpdateMoveVars");
+//     R_TimeReport("UpdateMoveVars");
 
        parsingerror = false;
 
@@ -4096,7 +4096,7 @@ void CL_ParseServerMessage(void)
        if (cls.demorecording)
        {
                CL_WriteDemoMessage (&net_message);
-               R_TimeReport("WriteDemo");
+//             R_TimeReport("WriteDemo");
        }
 }
 
index 0974a11..987236d 100644 (file)
@@ -252,7 +252,7 @@ static void VM_CL_traceline (void)
        int             move, svent;
        prvm_edict_t    *ent;
 
-       R_TimeReport("pretraceline");
+//     R_TimeReport("pretraceline");
 
        VM_SAFEPARMCOUNTRANGE(4, 4, VM_CL_traceline);
 
@@ -269,7 +269,7 @@ static void VM_CL_traceline (void)
        trace = CL_TraceLine(v1, v2, move, ent, CL_GenericHitSuperContentsMask(ent), CL_HitNetworkBrushModels(move), CL_HitNetworkPlayers(move), &svent, true);
 
        CL_VM_SetTraceGlobals(&trace, svent);
-       R_TimeReport("traceline");
+//     R_TimeReport("traceline");
 }
 
 /*
@@ -291,7 +291,7 @@ static void VM_CL_tracebox (void)
        int             move, svent;
        prvm_edict_t    *ent;
 
-       R_TimeReport("pretracebox");
+//     R_TimeReport("pretracebox");
        VM_SAFEPARMCOUNTRANGE(6, 8, VM_CL_tracebox); // allow more parameters for future expansion
 
        prog->xfunction->builtinsprofile += 30;
@@ -309,7 +309,7 @@ static void VM_CL_tracebox (void)
        trace = CL_TraceBox(v1, m1, m2, v2, move, ent, CL_GenericHitSuperContentsMask(ent), CL_HitNetworkBrushModels(move), CL_HitNetworkPlayers(move), &svent, true);
 
        CL_VM_SetTraceGlobals(&trace, svent);
-       R_TimeReport("tracebox");
+//     R_TimeReport("tracebox");
 }
 
 trace_t CL_Trace_Toss (prvm_edict_t *tossent, prvm_edict_t *ignore, int *svent)
index b1df2d9..e91a8d1 100644 (file)
@@ -8340,6 +8340,9 @@ void R_RenderScene(void)
 {
        qboolean shadowmapping = false;
 
+       if (r_timereport_active)
+               R_TimeReport("beginscene");
+
        r_refdef.stats.renders++;
 
        R_UpdateFogColor();
@@ -8354,6 +8357,9 @@ void R_RenderScene(void)
 
        Matrix4x4_CreateTranslate(&r_waterscrollmatrix, sin(r_refdef.scene.time) * 0.025 * r_waterscroll.value, sin(r_refdef.scene.time * 0.8f) * 0.025 * r_waterscroll.value, 0);
 
+       if (r_timereport_active)
+               R_TimeReport("skystartframe");
+
        if (cl.csqc_vidvars.drawworld)
        {
                // don't let sound skip if going slow
diff --git a/host.c b/host.c
index c8a5c8e..f90173f 100644 (file)
--- a/host.c
+++ b/host.c
@@ -700,10 +700,10 @@ void Host_Main(void)
                if (sv.active ? sv_timer > 0 : cl_timer > 0)
                {
                        // process console commands
-                       R_TimeReport("preconsole");
+//                     R_TimeReport("preconsole");
                        CL_VM_PreventInformationLeaks();
                        Cbuf_Execute();
-                       R_TimeReport("console");
+//                     R_TimeReport("console");
                }
 
                //Con_Printf("%6.0f %6.0f\n", cl_timer * 1000000.0, sv_timer * 1000000.0);
@@ -725,10 +725,12 @@ void Host_Main(void)
                        else
                                Sys_Sleep((int)wait);
                        svs.perf_acc_sleeptime += Sys_DoubleTime() - time0;
-                       R_TimeReport("sleep");
+//                     R_TimeReport("sleep");
                        continue;
                }
 
+               R_TimeReport("---");
+
        //-------------------
        //
        // server operations
@@ -832,6 +834,12 @@ void Host_Main(void)
                        NetConn_Heartbeat(0);
                        R_TimeReport("servernetwork");
                }
+               else
+               {
+                       // don't let r_speeds display jump around
+                       R_TimeReport("serverphysics");
+                       R_TimeReport("servernetwork");
+               }
 
        //-------------------
        //
@@ -925,6 +933,7 @@ void Host_Main(void)
                        R_TimeReport("client");
 
                        CL_UpdateScreen();
+                       R_TimeReport("render");
 
                        if (host_speeds.integer)
                                time2 = Sys_DoubleTime();
index 075ecd8..2700ee4 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -2128,9 +2128,9 @@ void NetConn_ClientFrame(void)
        {
                while (cl_sockets[i] && (length = NetConn_Read(cl_sockets[i], readbuffer, sizeof(readbuffer), &peeraddress)) > 0)
                {
-                       R_TimeReport("clientreadnetwork");
+//                     R_TimeReport("clientreadnetwork");
                        NetConn_ClientParsePacket(cl_sockets[i], readbuffer, length, &peeraddress);
-                       R_TimeReport("clientparsepacket");
+//                     R_TimeReport("clientparsepacket");
                }
        }
        NetConn_QueryQueueFrame();
index a73a518..2d456a4 100644 (file)
@@ -1894,6 +1894,7 @@ static void S_PaintAndSubmit (void)
        oldsoundtime = soundtime;
 
        cls.soundstats.latency_milliseconds = (snd_renderbuffer->endframe - snd_renderbuffer->startframe) * 1000 / snd_renderbuffer->format.speed;
+       R_TimeReport("audiomix");
 }
 
 /*
@@ -1980,6 +1981,7 @@ void S_Update(const matrix4x4_t *listenermatrix)
        S_UpdateAmbientSounds ();
 
        combine = NULL;
+       R_TimeReport("audioprep");
 
        // update spatialization for static and dynamic sounds
        cls.soundstats.totalsounds = 0;
@@ -2033,6 +2035,7 @@ void S_Update(const matrix4x4_t *listenermatrix)
                if (k < SND_LISTENERS)
                        cls.soundstats.mixedsounds++;
        }
+       R_TimeReport("audiospatialize");
 
        sound_spatialized = true;
 
index 92ff70d..a7a2adf 100644 (file)
--- a/snd_win.c
+++ b/snd_win.c
@@ -769,7 +769,7 @@ unsigned int SndSys_GetSoundTime (void)
                {
                        if (snd_completed == snd_sent)
                        {
-                               Con_DPrint("Sound overrun\n");
+                       //      Con_DPrint("Sound overrun\n");
                                break;
                        }