Add interpolation related stats to perfstats #166
No files matched your search
@@ -827,6 +827,11 @@ void D_SRB2Loop(void)
|
||||
{
|
||||
renderdeltatics = FloatToFixed(deltatics);
|
||||
|
||||
// I looked at the possibility of putting in a float drawer for
|
||||
// perfstats and it's very complicated, so we'll just do this instead...
|
||||
ps_interp_frac.value.p = (precise_t)((FIXED_TO_FLOAT(g_time.timefrac)) * 1000.0f);
|
||||
ps_interp_lag.value.p = (precise_t)((deltasecs) * 1000.0f);
|
||||
|
||||
if (!(paused || P_AutoPause()) && deltatics < 1.0 && !hu_stopped)
|
||||
{
|
||||
rendertimefrac = g_time.timefrac;
|
||||
|
||||
+11
-11
@@ -126,11 +126,11 @@ perfstatrow_t commoncounter_rows[] = {
|
||||
{0}
|
||||
|
|
||||
};
|
||||
|
||||
/*perfstatrow_t interpolation_rows[] = {
|
||||
{"intpfrc", "Interp frac: ", &ps_interp_frac, PS_TIME},
|
||||
{"intplag", "Interp lag: ", &ps_interp_lag, PS_TIME},
|
||||
perfstatrow_t interpolation_rows[] = {
|
||||
{"intpfrc", "Interp frac: ", &ps_interp_frac, 0},
|
||||
{"intplag", "Interp lag: ", &ps_interp_lag, 0},
|
||||
{0}
|
||||
};*/
|
||||
};
|
||||
|
||||
#ifdef HWRENDER
|
||||
perfstatrow_t batchcount_rows[] = {
|
||||
@@ -553,8 +553,8 @@ static void PS_UpdateFrameStats(void)
|
||||
if (PS_IsLevelActive())
|
||||
PS_UpdateRowHistories(commoncounter_rows, true);
|
||||
|
||||
/*if (R_UsingFrameInterpolation())
|
||||
PS_UpdateRowHistories(interpolation_rows, true);*/
|
||||
if (R_UsingFrameInterpolation())
|
||||
PS_UpdateRowHistories(interpolation_rows, true);
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl && cv_glbatching.value)
|
||||
@@ -773,7 +773,7 @@ static void PS_DrawRenderStats(void)
|
||||
{
|
||||
const boolean hires = PS_HighResolution();
|
||||
const int half_row = hires ? 5 : 4;
|
||||
int x, y = 10; //, cy = 10;
|
||||
int x, y, cy = 10;
|
||||
|
||||
PS_DrawDescriptorHeader();
|
||||
|
||||
@@ -784,7 +784,7 @@ static void PS_DrawRenderStats(void)
|
||||
if (PS_IsLevelActive())
|
||||
{
|
||||
x = hires ? 115 : 90;
|
||||
/*cy = */PS_DrawPerfRows(x, 10, V_BLUEMAP, commoncounter_rows);// + half_row;
|
||||
cy = PS_DrawPerfRows(x, 10, V_BLUEMAP, commoncounter_rows) + half_row;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl && cv_glbatching.value)
|
||||
@@ -799,11 +799,11 @@ static void PS_DrawRenderStats(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*if (R_UsingFrameInterpolation())
|
||||
if (R_UsingFrameInterpolation())
|
||||
{
|
||||
x = hires ? 115 : 90;
|
||||
PS_DrawPerfRows(x, cy, V_ROSYMAP, interpolation_rows);
|
||||
}*/
|
||||
PS_DrawPerfRows(x, cy, V_PEACHMAP, interpolation_rows);
|
||||
}
|
||||
}
|
||||
|
||||
static void PS_DrawGameLogicStats(void)
|
||||
|
||||
@@ -45,6 +45,9 @@ consvar_t cv_fpscap = {"fpscap", "Match refresh rate", CV_SAVE, fpscap_cons_t, N
|
||||
|
||||
consvar_t cv_precipinterp = {"precipinterpolation", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
ps_metric_t ps_interp_frac = {0};
|
||||
ps_metric_t ps_interp_lag = {0};
|
||||
|
||||
UINT32 R_GetFramerateCap(void)
|
||||
{
|
||||
if (rendermode == render_none)
|
||||
|
||||
@@ -18,10 +18,14 @@
|
||||
#include "m_fixed.h"
|
||||
#include "p_local.h"
|
||||
#include "r_state.h"
|
||||
#include "m_perfstats.h"
|
||||
|
||||
extern consvar_t cv_fpscap;
|
||||
extern consvar_t cv_precipinterp;
|
||||
|
||||
extern ps_metric_t ps_interp_frac;
|
||||
extern ps_metric_t ps_interp_lag;
|
||||
|
||||
UINT32 R_GetFramerateCap(void);
|
||||
boolean R_UsingFrameInterpolation(void);
|
||||
|
||||
|
||||
Reference in new issue
Block a user
Here ps_interp_frac and ps_interp_lag are used with PS_TIME flag, but that's (from what i understand) intended for values returned from I_GetPreciseTime, so right now those stats just display 0 at all times (for me at least). So they probably shouldn't have PS_TIME
Should be fixed now
