summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-20 19:20:52 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-23 14:52:57 +0200
commitb8aef40c56588c999b15a63516b5d68958f667df (patch)
tree0edd0e6d5346b8cc3d992962c6381efe7a897dc2 /src/video_core
parentMaxwell3D: Process Macros on MultiMethod. (diff)
downloadyuzu-b8aef40c56588c999b15a63516b5d68958f667df.tar
yuzu-b8aef40c56588c999b15a63516b5d68958f667df.tar.gz
yuzu-b8aef40c56588c999b15a63516b5d68958f667df.tar.bz2
yuzu-b8aef40c56588c999b15a63516b5d68958f667df.tar.lz
yuzu-b8aef40c56588c999b15a63516b5d68958f667df.tar.xz
yuzu-b8aef40c56588c999b15a63516b5d68958f667df.tar.zst
yuzu-b8aef40c56588c999b15a63516b5d68958f667df.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index 54e7876a6..d2bd3cc9d 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -9,6 +9,7 @@
#include "core/core_timing_util.h"
#include "core/frontend/emu_window.h"
#include "core/memory.h"
+#include "core/settings.h"
#include "video_core/engines/fermi_2d.h"
#include "video_core/engines/kepler_compute.h"
#include "video_core/engines/kepler_memory.h"
@@ -154,7 +155,10 @@ u64 GPU::GetTicks() const {
constexpr u64 gpu_ticks_den = 625;
const u64 cpu_ticks = system.CoreTiming().GetTicks();
- const u64 nanoseconds = Core::Timing::CyclesToNs(cpu_ticks).count();
+ u64 nanoseconds = Core::Timing::CyclesToNs(cpu_ticks).count();
+ if (Settings::values.use_fast_gpu_time) {
+ nanoseconds /= 256;
+ }
const u64 nanoseconds_num = nanoseconds / gpu_ticks_den;
const u64 nanoseconds_rem = nanoseconds % gpu_ticks_den;
return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den;