diff options
| author | 2017-02-19 14:34:47 -0800 | |
|---|---|---|
| committer | 2017-02-26 17:22:03 -0800 | |
| commit | c75ae6c585f651a1b7c162c2e1ecccd22a1c587d (patch) | |
| tree | 30d51f39c6b57244e1ede29820c3f5d98ca38451 /src/video_core | |
| parent | SynchronizedWrapper: Add Lock convenience method (diff) | |
| download | yuzu-c75ae6c585f651a1b7c162c2e1ecccd22a1c587d.tar.gz yuzu-c75ae6c585f651a1b7c162c2e1ecccd22a1c587d.tar.xz yuzu-c75ae6c585f651a1b7c162c2e1ecccd22a1c587d.zip | |
Add performance statistics to status bar
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 2aa90e5c1..0b90dcb3d 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/profiler_reporting.h" | 13 | #include "common/profiler_reporting.h" |
| 14 | #include "common/synchronized_wrapper.h" | 14 | #include "common/synchronized_wrapper.h" |
| 15 | #include "core/core.h" | ||
| 15 | #include "core/frontend/emu_window.h" | 16 | #include "core/frontend/emu_window.h" |
| 16 | #include "core/hw/gpu.h" | 17 | #include "core/hw/gpu.h" |
| 17 | #include "core/hw/hw.h" | 18 | #include "core/hw/hw.h" |
| @@ -151,6 +152,10 @@ void RendererOpenGL::SwapBuffers() { | |||
| 151 | auto aggregator = Common::Profiling::GetTimingResultsAggregator(); | 152 | auto aggregator = Common::Profiling::GetTimingResultsAggregator(); |
| 152 | aggregator->AddFrame(profiler.GetPreviousFrameResults()); | 153 | aggregator->AddFrame(profiler.GetPreviousFrameResults()); |
| 153 | } | 154 | } |
| 155 | { | ||
| 156 | auto perf_stats = Core::System::GetInstance().perf_stats.Lock(); | ||
| 157 | perf_stats->EndSystemFrame(); | ||
| 158 | } | ||
| 154 | 159 | ||
| 155 | // Swap buffers | 160 | // Swap buffers |
| 156 | render_window->PollEvents(); | 161 | render_window->PollEvents(); |
| @@ -159,6 +164,10 @@ void RendererOpenGL::SwapBuffers() { | |||
| 159 | prev_state.Apply(); | 164 | prev_state.Apply(); |
| 160 | 165 | ||
| 161 | profiler.BeginFrame(); | 166 | profiler.BeginFrame(); |
| 167 | { | ||
| 168 | auto perf_stats = Core::System::GetInstance().perf_stats.Lock(); | ||
| 169 | perf_stats->BeginSystemFrame(); | ||
| 170 | } | ||
| 162 | 171 | ||
| 163 | RefreshRasterizerSetting(); | 172 | RefreshRasterizerSetting(); |
| 164 | 173 | ||