From dd1437ac63562d5a0a4eb19106218c56c0914201 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 15 Dec 2004 17:44:42 +0000 Subject: [PATCH] better dspeeds stuff. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@641 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/render.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/engine/client/render.h b/engine/client/render.h index 6d4367054..ff71d2c98 100644 --- a/engine/client/render.h +++ b/engine/client/render.h @@ -355,3 +355,44 @@ extern cvar_t gl_playermip; extern cvar_t r_palconvbits; extern cvar_t r_palconvwrite; + + + +enum { + RSPEED_TOTALREFRESH, + RSPEED_CLIENT, + RSPEED_WORLDNODE, + RSPEED_WORLD, + RSPEED_ENTITIES, + RSPEED_STENCILSHADOWS, + RSPEED_FULLBRIGHTS, + RSPEED_DYNAMIC, + RSPEED_PARTICLES, + RSPEED_PARTICLESDRAW, + RSPEED_PALETTEFLASHES, + RSPEED_2D, + RSPEED_SERVER, + RSPEED_FINISH, + + RSPEED_MAX +}; +int rspeeds[RSPEED_MAX]; + +enum { + RQUANT_MSECS, //old r_speeds + RQUANT_EPOLYS, + RQUANT_WPOLYS, + RQUANT_SHADOWFACES, + RQUANT_SHADOWEDGES, + RQUANT_LITFACES, + + RQUANT_MAX +}; +int rquant[RQUANT_MAX]; + +#define RQuantAdd(type,quant) rquant[type] += quant; + +#define RSpeedLocals() int rsp +#define RSpeedMark() int rsp = r_speeds.value?Sys_DoubleTime()*1000000:0 +#define RSpeedRemark() rsp = r_speeds.value?Sys_DoubleTime()*1000000:0 +#define RSpeedEnd(spt) rspeeds[spt] += r_speeds.value?Sys_DoubleTime()*1000000 - rsp:0