Move some render stats variables to better locations, add I_FinishUpdate timing
This commit is contained in:
parent
64a153fdee
commit
8dcc2fe20d
14
src/d_main.c
14
src/d_main.c
|
@ -620,10 +620,10 @@ static void D_Display(void)
|
||||||
snprintf(s, sizeof s - 1, "sdrw %d", rs_spritedrawtime / divisor);
|
snprintf(s, sizeof s - 1, "sdrw %d", rs_spritedrawtime / divisor);
|
||||||
V_DrawThinString(30, 70, V_MONOSPACE | V_YELLOWMAP, s);
|
V_DrawThinString(30, 70, V_MONOSPACE | V_YELLOWMAP, s);
|
||||||
/*snprintf(s, sizeof s - 1, "post %d", rs_posttime / divisor);
|
/*snprintf(s, sizeof s - 1, "post %d", rs_posttime / divisor);
|
||||||
|
V_DrawThinString(30, 80, V_MONOSPACE | V_YELLOWMAP, s);*/
|
||||||
|
snprintf(s, sizeof s - 1, "fin %d", rs_swaptime / divisor);
|
||||||
V_DrawThinString(30, 80, V_MONOSPACE | V_YELLOWMAP, s);
|
V_DrawThinString(30, 80, V_MONOSPACE | V_YELLOWMAP, s);
|
||||||
snprintf(s, sizeof s - 1, "flip %d", rs_swaptime / divisor);
|
/*snprintf(s, sizeof s - 1, "test %d", rs_test / divisor);
|
||||||
V_DrawThinString(30, 90, V_MONOSPACE | V_YELLOWMAP, s);
|
|
||||||
snprintf(s, sizeof s - 1, "test %d", rs_test / divisor);
|
|
||||||
V_DrawThinString(30, 100, V_MONOSPACE | V_YELLOWMAP, s);*/
|
V_DrawThinString(30, 100, V_MONOSPACE | V_YELLOWMAP, s);*/
|
||||||
|
|
||||||
snprintf(s, sizeof s - 1, "nbsp %d", rs_numbspcalls);
|
snprintf(s, sizeof s - 1, "nbsp %d", rs_numbspcalls);
|
||||||
|
@ -658,14 +658,16 @@ static void D_Display(void)
|
||||||
V_DrawThinString(185, 30, V_MONOSPACE | V_PURPLEMAP, s);
|
V_DrawThinString(185, 30, V_MONOSPACE | V_PURPLEMAP, s);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
/* else
|
else
|
||||||
{
|
{
|
||||||
snprintf(s, sizeof s - 1, "flip %d", rs_swaptime / divisor);
|
snprintf(s, sizeof s - 1, "fin %d", rs_swaptime / divisor);
|
||||||
V_DrawThinString(30, 30, V_MONOSPACE | V_YELLOWMAP, s);
|
V_DrawThinString(30, 30, V_MONOSPACE | V_YELLOWMAP, s);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rs_swaptime = I_GetTimeMicros();
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
|
rs_swaptime = I_GetTimeMicros() - rs_swaptime;
|
||||||
}
|
}
|
||||||
|
|
||||||
needpatchflush = false;
|
needpatchflush = false;
|
||||||
|
|
|
@ -146,9 +146,7 @@ static float gr_fovlud;
|
||||||
static angle_t gr_aimingangle;
|
static angle_t gr_aimingangle;
|
||||||
static void HWR_SetTransformAiming(FTransform *trans, player_t *player, boolean skybox);
|
static void HWR_SetTransformAiming(FTransform *trans, player_t *player, boolean skybox);
|
||||||
|
|
||||||
// render stats
|
// Render stats
|
||||||
int rs_prevframetime = 0;
|
|
||||||
int rs_rendercalltime = 0;
|
|
||||||
int rs_bsptime = 0;
|
int rs_bsptime = 0;
|
||||||
int rs_nodetime = 0;
|
int rs_nodetime = 0;
|
||||||
int rs_nodesorttime = 0;
|
int rs_nodesorttime = 0;
|
||||||
|
@ -162,7 +160,6 @@ int rs_numsprites = 0;
|
||||||
int rs_numpolyobjects = 0;
|
int rs_numpolyobjects = 0;
|
||||||
|
|
||||||
//int rs_posttime = 0;
|
//int rs_posttime = 0;
|
||||||
//int rs_swaptime = 0;
|
|
||||||
|
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
@ -6166,11 +6163,6 @@ consvar_t cv_granisotropicmode = {"gr_anisotropicmode", "1", CV_CALL, granisotro
|
||||||
consvar_t cv_grcorrecttricks = {"gr_correcttricks", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_grcorrecttricks = {"gr_correcttricks", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_grsolvetjoin = {"gr_solvetjoin", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_grsolvetjoin = {"gr_solvetjoin", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
// render stats
|
|
||||||
// for now have it in here in the hw code
|
|
||||||
// could have it somewhere else since renderstats could also be a software rendering thing
|
|
||||||
consvar_t cv_renderstats = {"renderstats", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
|
|
||||||
static void CV_grfiltermode_OnChange(void)
|
static void CV_grfiltermode_OnChange(void)
|
||||||
{
|
{
|
||||||
if (rendermode == render_opengl)
|
if (rendermode == render_opengl)
|
||||||
|
|
|
@ -105,11 +105,6 @@ extern fixed_t *hwbbox;
|
||||||
extern FTransform atransform;
|
extern FTransform atransform;
|
||||||
|
|
||||||
|
|
||||||
// render stats console toggle
|
|
||||||
extern consvar_t cv_renderstats;
|
|
||||||
// render stats time counter variables
|
|
||||||
extern int rs_prevframetime;// time when previous frame was rendered
|
|
||||||
extern int rs_rendercalltime;
|
|
||||||
extern int rs_bsptime;
|
extern int rs_bsptime;
|
||||||
extern int rs_nodetime;
|
extern int rs_nodetime;
|
||||||
extern int rs_nodesorttime;
|
extern int rs_nodesorttime;
|
||||||
|
@ -118,7 +113,6 @@ extern int rs_spritesorttime;
|
||||||
extern int rs_spritedrawtime;
|
extern int rs_spritedrawtime;
|
||||||
|
|
||||||
//extern int rs_posttime;
|
//extern int rs_posttime;
|
||||||
//extern int rs_swaptime;
|
|
||||||
|
|
||||||
extern int rs_numdrawnodes;
|
extern int rs_numdrawnodes;
|
||||||
extern int rs_numbspcalls;
|
extern int rs_numbspcalls;
|
||||||
|
|
|
@ -98,6 +98,11 @@ lighttable_t *zlight[LIGHTLEVELS][MAXLIGHTZ];
|
||||||
// Hack to support extra boom colormaps.
|
// Hack to support extra boom colormaps.
|
||||||
extracolormap_t *extra_colormaps = NULL;
|
extracolormap_t *extra_colormaps = NULL;
|
||||||
|
|
||||||
|
// Render stats
|
||||||
|
int rs_prevframetime = 0;
|
||||||
|
int rs_rendercalltime = 0;
|
||||||
|
int rs_swaptime = 0;
|
||||||
|
|
||||||
static CV_PossibleValue_t drawdist_cons_t[] = {
|
static CV_PossibleValue_t drawdist_cons_t[] = {
|
||||||
{256, "256"}, {512, "512"}, {768, "768"},
|
{256, "256"}, {512, "512"}, {768, "768"},
|
||||||
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
||||||
|
@ -148,6 +153,8 @@ consvar_t cv_homremoval = {"homremoval", "No", CV_SAVE, homremoval_cons_t, NULL,
|
||||||
|
|
||||||
consvar_t cv_maxportals = {"maxportals", "2", CV_SAVE, maxportals_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_maxportals = {"maxportals", "2", CV_SAVE, maxportals_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
consvar_t cv_renderstats = {"renderstats", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
void SplitScreen_OnChange(void)
|
void SplitScreen_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!cv_debug && netgame)
|
if (!cv_debug && netgame)
|
||||||
|
|
|
@ -74,6 +74,14 @@ subsector_t *R_PointInSubsectorOrNull(fixed_t x, fixed_t y);
|
||||||
|
|
||||||
boolean R_DoCulling(line_t *cullheight, line_t *viewcullheight, fixed_t vz, fixed_t bottomh, fixed_t toph);
|
boolean R_DoCulling(line_t *cullheight, line_t *viewcullheight, fixed_t vz, fixed_t bottomh, fixed_t toph);
|
||||||
|
|
||||||
|
// Render stats
|
||||||
|
|
||||||
|
extern consvar_t cv_renderstats;
|
||||||
|
|
||||||
|
extern int rs_prevframetime;// time when previous frame was rendered
|
||||||
|
extern int rs_rendercalltime;
|
||||||
|
extern int rs_swaptime;
|
||||||
|
|
||||||
//
|
//
|
||||||
// REFRESH - the actual rendering functions.
|
// REFRESH - the actual rendering functions.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue