Add a performance counter for GUI
This commit is contained in:
parent
ed98c4c8ff
commit
94900fe2c8
@ -125,6 +125,7 @@ enum QueryPerf
|
||||
Q_BLOOM,
|
||||
Q_TONEMAP,
|
||||
Q_MOTIONBLUR,
|
||||
Q_GUI,
|
||||
Q_LAST
|
||||
};
|
||||
|
||||
|
@ -235,10 +235,13 @@ void IrrDriver::renderGLSL(float dt)
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
} // for i<getNumKarts
|
||||
|
||||
PROFILER_PUSH_CPU_MARKER("GUIEngine", 0x75, 0x75, 0x75);
|
||||
// Either render the gui, or the global elements of the race gui.
|
||||
GUIEngine::render(dt);
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
{
|
||||
ScopedGPUTimer Timer(getGPUTimer(Q_GUI));
|
||||
PROFILER_PUSH_CPU_MARKER("GUIEngine", 0x75, 0x75, 0x75);
|
||||
// Either render the gui, or the global elements of the race gui.
|
||||
GUIEngine::render(dt);
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
}
|
||||
|
||||
// Render the profiler
|
||||
if(UserConfigParams::m_profiler_enabled)
|
||||
|
@ -407,7 +407,8 @@ void Profiler::draw()
|
||||
"Godrays",
|
||||
"Bloom",
|
||||
"Tonemap",
|
||||
"Motion Blur"
|
||||
"Motion Blur",
|
||||
"GUI",
|
||||
};
|
||||
std::ostringstream oss;
|
||||
oss << Phase[hovered_gpu_marker] << " : " << hovered_gpu_marker_elapsed << " us";
|
||||
|
Loading…
Reference in New Issue
Block a user