diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-13 07:09:58 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-13 07:09:58 +0400 |
commit | d23b383af0e2d1ff7416e6b889a9ef36851eed63 (patch) | |
tree | 70787c6f65f3ae5aab93f2cdbdb7110c5516b967 /source | |
parent | 5a9c012d86e900208db09b74aebd0bdd60ec711c (diff) |
BGE: Adding a GPU Latency profile category to represent the CPU time spent waiting on the graphics card.
Diffstat (limited to 'source')
-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; |