summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-19 04:56:29 +0200
committerGitHub <noreply@github.com>2021-05-19 04:56:29 +0200
commit7d86a6ff02e0778aa69ec52ef5c0eb0d26200818 (patch)
treeec9657e464e62c444ee2062cb0110b7e710d9788 /src/video_core
parentMerge pull request #6337 from Morph1984/transfer-mem-size (diff)
parentperf_stats: Rework FPS counter to be more accurate (diff)
downloadyuzu-7d86a6ff02e0778aa69ec52ef5c0eb0d26200818.tar
yuzu-7d86a6ff02e0778aa69ec52ef5c0eb0d26200818.tar.gz
yuzu-7d86a6ff02e0778aa69ec52ef5c0eb0d26200818.tar.bz2
yuzu-7d86a6ff02e0778aa69ec52ef5c0eb0d26200818.tar.lz
yuzu-7d86a6ff02e0778aa69ec52ef5c0eb0d26200818.tar.xz
yuzu-7d86a6ff02e0778aa69ec52ef5c0eb0d26200818.tar.zst
yuzu-7d86a6ff02e0778aa69ec52ef5c0eb0d26200818.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu.cpp5
-rw-r--r--src/video_core/gpu.h2
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp1
-rw-r--r--src/video_core/renderer_vulkan/renderer_vulkan.cpp1
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 @@
#include "core/frontend/emu_window.h"
#include "core/hardware_interrupt_manager.h"
#include "core/memory.h"
+#include "core/perf_stats.h"
#include "video_core/engines/fermi_2d.h"
#include "video_core/engines/kepler_compute.h"
#include "video_core/engines/kepler_memory.h"
@@ -191,6 +192,10 @@ u64 GPU::GetTicks() const {
return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den;
}
+void GPU::RendererFrameEndNotify() {
+ system.GetPerfStats().EndGameFrame();
+}
+
void GPU::FlushCommands() {
rasterizer->FlushCommands();
}
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:
return use_nvdec;
}
+ void RendererFrameEndNotify();
+
enum class FenceOperation : u32 {
Acquire = 0,
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) {
++m_current_frame;
+ gpu.RendererFrameEndNotify();
rasterizer.TickFrame();
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) {
if (swapchain.Present(render_semaphore)) {
blit_screen.Recreate();
}
+ gpu.RendererFrameEndNotify();
rasterizer.TickFrame();
}