mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 23:27:34 +02:00
Merge pull request #9421 from jherico/more_trace_details
Additional trace details for GPU timing, frame data updates
This commit is contained in:
commit
70de00c6bf
2 changed files with 22 additions and 9 deletions
|
@ -3398,6 +3398,8 @@ void Application::idle(float nsecsElapsed) {
|
||||||
PROFILE_COUNTER(app, "cpuSystem", { { "system", kernelUserAndSystem.z } });
|
PROFILE_COUNTER(app, "cpuSystem", { { "system", kernelUserAndSystem.z } });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auto displayPlugin = getActiveDisplayPlugin();
|
auto displayPlugin = getActiveDisplayPlugin();
|
||||||
if (displayPlugin) {
|
if (displayPlugin) {
|
||||||
PROFILE_COUNTER_IF_CHANGED(app, "present", float, displayPlugin->presentRate());
|
PROFILE_COUNTER_IF_CHANGED(app, "present", float, displayPlugin->presentRate());
|
||||||
|
@ -3407,9 +3409,15 @@ void Application::idle(float nsecsElapsed) {
|
||||||
PROFILE_COUNTER_IF_CHANGED(app, "pendingDownloads", int, ResourceCache::getPendingRequestCount());
|
PROFILE_COUNTER_IF_CHANGED(app, "pendingDownloads", int, ResourceCache::getPendingRequestCount());
|
||||||
PROFILE_COUNTER_IF_CHANGED(app, "currentProcessing", int, DependencyManager::get<StatTracker>()->getStat("Processing").toInt());
|
PROFILE_COUNTER_IF_CHANGED(app, "currentProcessing", int, DependencyManager::get<StatTracker>()->getStat("Processing").toInt());
|
||||||
PROFILE_COUNTER_IF_CHANGED(app, "pendingProcessing", int, DependencyManager::get<StatTracker>()->getStat("PendingProcessing").toInt());
|
PROFILE_COUNTER_IF_CHANGED(app, "pendingProcessing", int, DependencyManager::get<StatTracker>()->getStat("PendingProcessing").toInt());
|
||||||
|
auto renderConfig = _renderEngine->getConfiguration();
|
||||||
|
PROFILE_COUNTER_IF_CHANGED(render, "gpuTime", float, (float)_gpuContext->getFrameTimerGPUAverage());
|
||||||
|
PROFILE_COUNTER(render_detail, "gpuTimes", {
|
||||||
|
{ "OpaqueRangeTimer", renderConfig->getConfig("OpaqueRangeTimer")->property("gpuRunTime") },
|
||||||
|
{ "LinearDepth", renderConfig->getConfig("LinearDepth")->property("gpuRunTime") },
|
||||||
|
{ "SurfaceGeometry", renderConfig->getConfig("SurfaceGeometry")->property("gpuRunTime") },
|
||||||
|
{ "RenderDeferred", renderConfig->getConfig("RenderDeferred")->property("gpuRunTime") },
|
||||||
|
{ "ToneAndPostRangeTimer", renderConfig->getConfig("ToneAndPostRangeTimer")->property("gpuRunTime") }
|
||||||
|
});
|
||||||
|
|
||||||
PROFILE_RANGE(app, __FUNCTION__);
|
PROFILE_RANGE(app, __FUNCTION__);
|
||||||
|
|
||||||
|
|
|
@ -482,6 +482,7 @@ void OpenGLDisplayPlugin::submitFrame(const gpu::FramePointer& newFrame) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLDisplayPlugin::updateFrameData() {
|
void OpenGLDisplayPlugin::updateFrameData() {
|
||||||
|
PROFILE_RANGE(render, __FUNCTION__)
|
||||||
if (_lockCurrentTexture) {
|
if (_lockCurrentTexture) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -596,12 +597,16 @@ void OpenGLDisplayPlugin::internalPresent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLDisplayPlugin::present() {
|
void OpenGLDisplayPlugin::present() {
|
||||||
PROFILE_RANGE_EX(render, __FUNCTION__, 0xffffff00, (uint64_t)presentCount())
|
auto frameId = (uint64_t)presentCount();
|
||||||
updateFrameData();
|
PROFILE_RANGE_EX(render, __FUNCTION__, 0xffffff00, frameId)
|
||||||
|
{
|
||||||
|
PROFILE_RANGE_EX(render, "updateFrameData", 0xff00ff00, frameId)
|
||||||
|
updateFrameData();
|
||||||
|
}
|
||||||
incrementPresentCount();
|
incrementPresentCount();
|
||||||
|
|
||||||
{
|
{
|
||||||
PROFILE_RANGE_EX(render, "recycle", 0xff00ff00, (uint64_t)presentCount())
|
PROFILE_RANGE_EX(render, "recycle", 0xff00ff00, frameId)
|
||||||
_gpuContext->recycle();
|
_gpuContext->recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,19 +620,19 @@ void OpenGLDisplayPlugin::present() {
|
||||||
_lastFrame = _currentFrame.get();
|
_lastFrame = _currentFrame.get();
|
||||||
});
|
});
|
||||||
// Execute the frame rendering commands
|
// Execute the frame rendering commands
|
||||||
PROFILE_RANGE_EX(render, "execute", 0xff00ff00, (uint64_t)presentCount())
|
PROFILE_RANGE_EX(render, "execute", 0xff00ff00, frameId)
|
||||||
_gpuContext->executeFrame(_currentFrame);
|
_gpuContext->executeFrame(_currentFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write all layers to a local framebuffer
|
// Write all layers to a local framebuffer
|
||||||
{
|
{
|
||||||
PROFILE_RANGE_EX(render, "composite", 0xff00ffff, (uint64_t)presentCount())
|
PROFILE_RANGE_EX(render, "composite", 0xff00ffff, frameId)
|
||||||
compositeLayers();
|
compositeLayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Take the composite framebuffer and send it to the output device
|
// Take the composite framebuffer and send it to the output device
|
||||||
{
|
{
|
||||||
PROFILE_RANGE_EX(render, "internalPresent", 0xff00ffff, (uint64_t)presentCount())
|
PROFILE_RANGE_EX(render, "internalPresent", 0xff00ffff, frameId)
|
||||||
internalPresent();
|
internalPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue