MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / R_PerformanceCounters

Function R_PerformanceCounters

neo/renderer/RenderSystem.cpp:53–126  ·  view source on GitHub ↗

===================== R_PerformanceCounters This prints both front and back end counters, so it should only be called when the back end thread is idle. ===================== */

Source from the content-addressed store, hash-verified

51=====================
52*/
53static void R_PerformanceCounters( void ) {
54 if ( r_showPrimitives.GetInteger() != 0 ) {
55
56 float megaBytes = globalImages->SumOfUsedImages() / ( 1024*1024.0 );
57
58 if ( r_showPrimitives.GetInteger() > 1 ) {
59 common->Printf( "v:%i ds:%i t:%i/%i v:%i/%i st:%i sv:%i image:%5.1f MB\n",
60 tr.pc.c_numViews,
61 backEnd.pc.c_drawElements + backEnd.pc.c_shadowElements,
62 backEnd.pc.c_drawIndexes / 3,
63 ( backEnd.pc.c_drawIndexes - backEnd.pc.c_drawRefIndexes ) / 3,
64 backEnd.pc.c_drawVertexes,
65 ( backEnd.pc.c_drawVertexes - backEnd.pc.c_drawRefVertexes ),
66 backEnd.pc.c_shadowIndexes / 3,
67 backEnd.pc.c_shadowVertexes,
68 megaBytes
69 );
70 } else {
71 common->Printf( "views:%i draws:%i tris:%i (shdw:%i) (vbo:%i) image:%5.1f MB\n",
72 tr.pc.c_numViews,
73 backEnd.pc.c_drawElements + backEnd.pc.c_shadowElements,
74 ( backEnd.pc.c_drawIndexes + backEnd.pc.c_shadowIndexes ) / 3,
75 backEnd.pc.c_shadowIndexes / 3,
76 backEnd.pc.c_vboIndexes / 3,
77 megaBytes
78 );
79 }
80 }
81
82 if ( r_showDynamic.GetBool() ) {
83 common->Printf( "callback:%i md5:%i dfrmVerts:%i dfrmTris:%i tangTris:%i guis:%i\n",
84 tr.pc.c_entityDefCallbacks,
85 tr.pc.c_generateMd5,
86 tr.pc.c_deformedVerts,
87 tr.pc.c_deformedIndexes/3,
88 tr.pc.c_tangentIndexes/3,
89 tr.pc.c_guiSurfs
90 );
91 }
92
93 if ( r_showCull.GetBool() ) {
94 common->Printf( "%i sin %i sclip %i sout %i bin %i bout\n",
95 tr.pc.c_sphere_cull_in, tr.pc.c_sphere_cull_clip, tr.pc.c_sphere_cull_out,
96 tr.pc.c_box_cull_in, tr.pc.c_box_cull_out );
97 }
98
99 if ( r_showAlloc.GetBool() ) {
100 common->Printf( "alloc:%i free:%i\n", tr.pc.c_alloc, tr.pc.c_free );
101 }
102
103 if ( r_showInteractions.GetBool() ) {
104 common->Printf( "createInteractions:%i createLightTris:%i createShadowVolumes:%i\n",
105 tr.pc.c_createInteractions, tr.pc.c_createLightTris, tr.pc.c_createShadowVolumes );
106 }
107 if ( r_showDefs.GetBool() ) {
108 common->Printf( "viewEntities:%i shadowEntities:%i viewLights:%i\n", tr.pc.c_visibleViewEntities,
109 tr.pc.c_shadowViewEntities, tr.pc.c_viewLights );
110 }

Callers 1

EndFrameMethod · 0.85

Calls 5

R_CountFrameDataFunction · 0.85
GetIntegerMethod · 0.80
SumOfUsedImagesMethod · 0.80
PrintfMethod · 0.45
GetBoolMethod · 0.45

Tested by

no test coverage detected