diff options
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.h | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 360a337f852..32666ec0792 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -99,7 +99,8 @@ const char KX_KetsjiEngine::m_profileLabels[tc_numCategories][15] = { "Rasterizer:", // tc_rasterizer "Services:", // tc_services "Overhead:", // tc_overhead - "Outside:" // tc_outside + "Outside:", // tc_outside + "GPU Latency:" // tc_latency }; double KX_KetsjiEngine::m_ticrate = DEFAULT_LOGIC_TIC_RATE; @@ -542,7 +543,10 @@ void KX_KetsjiEngine::EndFrame() m_logger->StartLog(tc_rasterizer, m_kxsystem->GetTimeInSeconds(), true); m_rasterizer->EndFrame(); // swap backbuffer (drawing into this buffer) <-> front/visible buffer + m_logger->StartLog(tc_latency, m_kxsystem->GetTimeInSeconds(), true); m_rasterizer->SwapBuffers(); + m_logger->StartLog(tc_rasterizer, m_kxsystem->GetTimeInSeconds(), true); + m_rendertools->EndFrame(m_rasterizer); diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index 4dd8ea10e62..d5d7262a418 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -158,9 +158,10 @@ private: tc_network, tc_scenegraph, tc_rasterizer, - tc_services, // time spend in miscelaneous activities + tc_services, // time spent in miscelaneous activities tc_overhead, // profile info drawing overhead - tc_outside, // time spend outside main loop + tc_outside, // time spent outside main loop + tc_latency, // time spent waiting on the gpu tc_numCategories } KX_TimeCategory; |