diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-05-28 23:45:47 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-06-08 03:44:42 +0200 |
commit | 907507886d755fa56099713c4b8f05bb640a8b7d (patch) | |
tree | a6ef3a8dfa9ba4aab797ab4985e078aba4b89fd2 /src/video_core | |
parent | time: Use compile time division for TimeSpanType conversion (diff) | |
download | yuzu-907507886d755fa56099713c4b8f05bb640a8b7d.tar yuzu-907507886d755fa56099713c4b8f05bb640a8b7d.tar.gz yuzu-907507886d755fa56099713c4b8f05bb640a8b7d.tar.bz2 yuzu-907507886d755fa56099713c4b8f05bb640a8b7d.tar.lz yuzu-907507886d755fa56099713c4b8f05bb640a8b7d.tar.xz yuzu-907507886d755fa56099713c4b8f05bb640a8b7d.tar.zst yuzu-907507886d755fa56099713c4b8f05bb640a8b7d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/gpu.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 70762c51a..db385076d 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -193,18 +193,13 @@ struct GPU::Impl { } [[nodiscard]] u64 GetTicks() const { - // This values were reversed engineered by fincs from NVN - // The GPU clock is 614.4 MHz - using NsToGPUTickRatio = std::ratio<614'400'000, std::nano::den>; - static_assert(NsToGPUTickRatio::num == 384 && NsToGPUTickRatio::den == 625); - - u64 nanoseconds = system.CoreTiming().GetGlobalTimeNs().count(); + u64 gpu_tick = system.CoreTiming().GetGPUTicks(); if (Settings::values.use_fast_gpu_time.GetValue()) { - nanoseconds /= 256; + gpu_tick /= 256; } - return nanoseconds * NsToGPUTickRatio::num / NsToGPUTickRatio::den; + return gpu_tick; } [[nodiscard]] bool IsAsync() const { |