diff options
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/gpu.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/gpu.h | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.cpp | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index a38024242..37f7b24e1 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include "core/frontend/emu_window.h" | 13 | #include "core/frontend/emu_window.h" |
| 14 | #include "core/hardware_interrupt_manager.h" | 14 | #include "core/hardware_interrupt_manager.h" |
| 15 | #include "core/memory.h" | 15 | #include "core/memory.h" |
| 16 | #include "core/perf_stats.h" | ||
| 16 | #include "video_core/engines/fermi_2d.h" | 17 | #include "video_core/engines/fermi_2d.h" |
| 17 | #include "video_core/engines/kepler_compute.h" | 18 | #include "video_core/engines/kepler_compute.h" |
| 18 | #include "video_core/engines/kepler_memory.h" | 19 | #include "video_core/engines/kepler_memory.h" |
| @@ -191,6 +192,10 @@ u64 GPU::GetTicks() const { | |||
| 191 | return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den; | 192 | return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den; |
| 192 | } | 193 | } |
| 193 | 194 | ||
| 195 | void GPU::RendererFrameEndNotify() { | ||
| 196 | system.GetPerfStats().EndGameFrame(); | ||
| 197 | } | ||
| 198 | |||
| 194 | void GPU::FlushCommands() { | 199 | void GPU::FlushCommands() { |
| 195 | rasterizer->FlushCommands(); | 200 | rasterizer->FlushCommands(); |
| 196 | } | 201 | } |
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 8669e9940..29a867863 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -247,6 +247,8 @@ public: | |||
| 247 | return use_nvdec; | 247 | return use_nvdec; |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | void RendererFrameEndNotify(); | ||
| 251 | |||
| 250 | enum class FenceOperation : u32 { | 252 | enum class FenceOperation : u32 { |
| 251 | Acquire = 0, | 253 | Acquire = 0, |
| 252 | Increment = 1, | 254 | Increment = 1, |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index cc2e499f9..a718bff7a 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -155,6 +155,7 @@ void RendererOpenGL::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { | |||
| 155 | 155 | ||
| 156 | ++m_current_frame; | 156 | ++m_current_frame; |
| 157 | 157 | ||
| 158 | gpu.RendererFrameEndNotify(); | ||
| 158 | rasterizer.TickFrame(); | 159 | rasterizer.TickFrame(); |
| 159 | 160 | ||
| 160 | context->SwapBuffers(); | 161 | context->SwapBuffers(); |
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 2e0cf4232..3986eb172 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp | |||
| @@ -154,6 +154,7 @@ void RendererVulkan::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { | |||
| 154 | if (swapchain.Present(render_semaphore)) { | 154 | if (swapchain.Present(render_semaphore)) { |
| 155 | blit_screen.Recreate(); | 155 | blit_screen.Recreate(); |
| 156 | } | 156 | } |
| 157 | gpu.RendererFrameEndNotify(); | ||
| 157 | rasterizer.TickFrame(); | 158 | rasterizer.TickFrame(); |
| 158 | } | 159 | } |
| 159 | 160 | ||