Add self time to GPU zone info window.

This commit is contained in:
Bartosz Taudul 2019-02-14 01:31:06 +01:00
parent 0fad23dbae
commit e24ac42755

View File

@ -4493,8 +4493,12 @@ void View::DrawGpuInfoWindow()
const auto end = m_worker.GetZoneEnd( ev );
const auto ztime = end - ev.gpuStart;
const auto selftime = ztime - GetZoneChildTime( ev );
TextFocused( "Time from start of program:", TimeToString( ev.gpuStart - m_worker.GetTimeBegin() ) );
TextFocused( "GPU execution time:", TimeToString( ztime ) );
TextFocused( "GPU self time:", TimeToString( selftime ) );
ImGui::SameLine();
ImGui::TextDisabled( "(%.2f%%)", 100.f * selftime / ztime );
TextFocused( "CPU command setup time:", TimeToString( ev.cpuEnd - ev.cpuStart ) );
auto ctx = GetZoneCtx( ev );
if( !ctx )