diff options
| author | 2023-07-27 18:40:56 -0400 | |
|---|---|---|
| committer | 2023-07-27 18:40:56 -0400 | |
| commit | bb4e67615502af559c940e4bbbf93b00ed0e4bc1 (patch) | |
| tree | 862edbd36faa79660ac6b2d777abeba4b039870b | |
| parent | Merge pull request #11128 from german77/discord (diff) | |
| download | yuzu-bb4e67615502af559c940e4bbbf93b00ed0e4bc1.tar.gz yuzu-bb4e67615502af559c940e4bbbf93b00ed0e4bc1.tar.xz yuzu-bb4e67615502af559c940e4bbbf93b00ed0e4bc1.zip | |
wall_clock: Increase precision requirements
We are providing a conversion to nanoseconds in NativeClock, which is more precise than the GPU tick.
Diffstat (limited to '')
| -rw-r--r-- | src/common/wall_clock.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp index dc0dcbd68..71e15ab4c 100644 --- a/src/common/wall_clock.cpp +++ b/src/common/wall_clock.cpp | |||
| @@ -56,12 +56,12 @@ std::unique_ptr<WallClock> CreateOptimalClock() { | |||
| 56 | #ifdef ARCHITECTURE_x86_64 | 56 | #ifdef ARCHITECTURE_x86_64 |
| 57 | const auto& caps = GetCPUCaps(); | 57 | const auto& caps = GetCPUCaps(); |
| 58 | 58 | ||
| 59 | if (caps.invariant_tsc && caps.tsc_frequency >= WallClock::GPUTickFreq) { | 59 | if (caps.invariant_tsc && caps.tsc_frequency >= std::nano::den) { |
| 60 | return std::make_unique<X64::NativeClock>(caps.tsc_frequency); | 60 | return std::make_unique<X64::NativeClock>(caps.tsc_frequency); |
| 61 | } else { | 61 | } else { |
| 62 | // Fallback to StandardWallClock if the hardware TSC | 62 | // Fallback to StandardWallClock if the hardware TSC |
| 63 | // - Is not invariant | 63 | // - Is not invariant |
| 64 | // - Is not more precise than GPUTickFreq | 64 | // - Is not more precise than 1 GHz (1ns resolution) |
| 65 | return std::make_unique<StandardWallClock>(); | 65 | return std::make_unique<StandardWallClock>(); |
| 66 | } | 66 | } |
| 67 | #else | 67 | #else |