summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-09-26 16:12:05 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-10-05 01:59:50 +0200
commitffc2ce89a03d8160c408922cd72a1f45e333c0fe (patch)
treed6990930ba921332a6cbec1985d2df6a93026126
parentNvFlinger: Don't swap buffers if a frame is missing and always trigger event in sync gpu. (diff)
downloadyuzu-ffc2ce89a03d8160c408922cd72a1f45e333c0fe.tar
yuzu-ffc2ce89a03d8160c408922cd72a1f45e333c0fe.tar.gz
yuzu-ffc2ce89a03d8160c408922cd72a1f45e333c0fe.tar.bz2
yuzu-ffc2ce89a03d8160c408922cd72a1f45e333c0fe.tar.lz
yuzu-ffc2ce89a03d8160c408922cd72a1f45e333c0fe.tar.xz
yuzu-ffc2ce89a03d8160c408922cd72a1f45e333c0fe.tar.zst
yuzu-ffc2ce89a03d8160c408922cd72a1f45e333c0fe.zip
-rw-r--r--src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp4
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
index f764388bc..3f7b8e670 100644
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
@@ -5,6 +5,7 @@
#include "common/assert.h"
#include "common/logging/log.h"
#include "core/core.h"
+#include "core/core_timing.h"
#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
#include "core/hle/service/nvdrv/devices/nvmap.h"
#include "core/perf_stats.h"
@@ -38,7 +39,10 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3
transform, crop_rect};
system.GetPerfStats().EndGameFrame();
+ system.GetPerfStats().EndSystemFrame();
system.GPU().SwapBuffers(&framebuffer);
+ system.FrameLimiter().DoFrameLimiting(system.CoreTiming().GetGlobalTimeUs());
+ system.GetPerfStats().BeginSystemFrame();
}
} // namespace Service::Nvidia::Devices
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 1e6ef66ab..7f6ff0857 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -135,9 +135,6 @@ void RendererOpenGL::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
render_window.PollEvents();
- system.FrameLimiter().DoFrameLimiting(system.CoreTiming().GetGlobalTimeUs());
- system.GetPerfStats().BeginSystemFrame();
-
// Restore the rasterizer state
prev_state.AllDirty();
prev_state.Apply();