summaryrefslogtreecommitdiff
path: root/src/common/x64/cpu_detect.h
diff options
context:
space:
mode:
authorGravatar Marshall Mohror2022-07-06 12:42:01 -0500
committerGravatar Marshall Mohror2022-07-06 12:42:01 -0500
commitb2ad4dd189135be9a87af86619d6f5854525f7fa (patch)
treed290710b8975e063db7c38ef497e46cfdc71301f /src/common/x64/cpu_detect.h
parentMerge pull request #8486 from liushuyu/github-actions-verify (diff)
downloadyuzu-b2ad4dd189135be9a87af86619d6f5854525f7fa.tar.gz
yuzu-b2ad4dd189135be9a87af86619d6f5854525f7fa.tar.xz
yuzu-b2ad4dd189135be9a87af86619d6f5854525f7fa.zip
common/x64: Use TSC clock rate from CPUID when available
The current method used to estimate the TSC is fairly accurate - within a few kHz - but the exact value can be extracted from CPUID if available.
Diffstat (limited to 'src/common/x64/cpu_detect.h')
-rw-r--r--src/common/x64/cpu_detect.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/x64/cpu_detect.h b/src/common/x64/cpu_detect.h
index 9bdc9dbfa..6830f3795 100644
--- a/src/common/x64/cpu_detect.h
+++ b/src/common/x64/cpu_detect.h
@@ -30,6 +30,11 @@ struct CPUCaps {
30 u32 max_frequency; 30 u32 max_frequency;
31 u32 bus_frequency; 31 u32 bus_frequency;
32 32
33 u32 tsc_crystal_ratio_denominator;
34 u32 tsc_crystal_ratio_numerator;
35 u32 crystal_frequency;
36 u64 tsc_frequency; // Derived from the above three values
37
33 bool sse : 1; 38 bool sse : 1;
34 bool sse2 : 1; 39 bool sse2 : 1;
35 bool sse3 : 1; 40 bool sse3 : 1;