mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 23:07:18 +00:00
[client] main: rename frameTimings to uploadTimings
This commit is contained in:
parent
62cd5e9c57
commit
8ebaf92006
@ -700,10 +700,7 @@ int main_frameThread(void * unused)
|
|||||||
g_state.lastFrameTime = t;
|
g_state.lastFrameTime = t;
|
||||||
|
|
||||||
if (g_state.lastFrameTimeValid)
|
if (g_state.lastFrameTimeValid)
|
||||||
{
|
ringbuffer_push(g_state.uploadTimings, &(float) { delta * 1e-6f });
|
||||||
const float fdelta = (float)delta / 1e6f;
|
|
||||||
ringbuffer_push(g_state.frameTimings, &fdelta);
|
|
||||||
}
|
|
||||||
g_state.lastFrameTimeValid = true;
|
g_state.lastFrameTimeValid = true;
|
||||||
|
|
||||||
atomic_fetch_add_explicit(&g_state.frameCount, 1, memory_order_relaxed);
|
atomic_fetch_add_explicit(&g_state.frameCount, 1, memory_order_relaxed);
|
||||||
@ -831,10 +828,10 @@ static int lg_run(void)
|
|||||||
|
|
||||||
// initialize metrics ringbuffers
|
// initialize metrics ringbuffers
|
||||||
g_state.renderTimings = ringbuffer_new(256, sizeof(float));
|
g_state.renderTimings = ringbuffer_new(256, sizeof(float));
|
||||||
g_state.frameTimings = ringbuffer_new(256, sizeof(float));
|
g_state.uploadTimings = ringbuffer_new(256, sizeof(float));
|
||||||
g_state.renderDuration = ringbuffer_new(256, sizeof(float));
|
g_state.renderDuration = ringbuffer_new(256, sizeof(float));
|
||||||
overlayGraph_register("FRAME" , g_state.renderTimings , 0.0f, 50.0f);
|
overlayGraph_register("FRAME" , g_state.renderTimings , 0.0f, 50.0f);
|
||||||
overlayGraph_register("UPLOAD", g_state.frameTimings , 0.0f, 50.0f);
|
overlayGraph_register("UPLOAD", g_state.uploadTimings , 0.0f, 50.0f);
|
||||||
overlayGraph_register("RENDER", g_state.renderDuration, 0.0f, 2.0f);
|
overlayGraph_register("RENDER", g_state.renderDuration, 0.0f, 2.0f);
|
||||||
|
|
||||||
initImGuiKeyMap(g_state.io->KeyMap);
|
initImGuiKeyMap(g_state.io->KeyMap);
|
||||||
@ -1237,7 +1234,7 @@ static void lg_shutdown(void)
|
|||||||
|
|
||||||
// free metrics ringbuffers
|
// free metrics ringbuffers
|
||||||
ringbuffer_free(&g_state.renderTimings);
|
ringbuffer_free(&g_state.renderTimings);
|
||||||
ringbuffer_free(&g_state.frameTimings );
|
ringbuffer_free(&g_state.uploadTimings);
|
||||||
ringbuffer_free(&g_state.renderDuration);
|
ringbuffer_free(&g_state.renderDuration);
|
||||||
|
|
||||||
free(g_state.fontName);
|
free(g_state.fontName);
|
||||||
|
@ -120,7 +120,7 @@ struct AppState
|
|||||||
bool lastRenderTimeValid;
|
bool lastRenderTimeValid;
|
||||||
RingBuffer renderTimings;
|
RingBuffer renderTimings;
|
||||||
RingBuffer renderDuration;
|
RingBuffer renderDuration;
|
||||||
RingBuffer frameTimings;
|
RingBuffer uploadTimings;
|
||||||
|
|
||||||
atomic_uint_least64_t pendingCount;
|
atomic_uint_least64_t pendingCount;
|
||||||
atomic_uint_least64_t renderCount, frameCount;
|
atomic_uint_least64_t renderCount, frameCount;
|
||||||
|
Loading…
Reference in New Issue
Block a user