Merge pull request #5501 from FearlessTobi/port-1064-3948

Port yuzu-emu/yuzu#1064 and yuzu-emu/yuzu#3948: Changes to Telemetry and CPU feature detection
This commit is contained in:
bunnei 2021-04-23 22:58:08 -07:00 committed by GitHub
commit 9ff97270cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 137 additions and 89 deletions

View file

@ -110,6 +110,11 @@ static CPUCaps Detect() {
caps.bmi1 = true;
if ((cpu_id[1] >> 8) & 1)
caps.bmi2 = true;
// Checks for AVX512F, AVX512CD, AVX512VL, AVX512DQ, AVX512BW (Intel Skylake-X/SP)
if ((cpu_id[1] >> 16) & 1 && (cpu_id[1] >> 28) & 1 && (cpu_id[1] >> 31) & 1 &&
(cpu_id[1] >> 17) & 1 && (cpu_id[1] >> 30) & 1) {
caps.avx512 = caps.avx2;
}
}
}

View file

@ -18,6 +18,7 @@ struct CPUCaps {
bool sse4_2;
bool avx;
bool avx2;
bool avx512;
bool bmi1;
bool bmi2;
bool fma;