aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-12-15 12:33:57 -0800
committerChris Robinson <[email protected]>2020-12-15 12:33:57 -0800
commit03358a0d8092520788690b7f143a4af098472b3f (patch)
treef5d92b4098b0e4f684df42a286b3a1ffde54d738 /alc/alc.cpp
parent9435641c0d285eae0fb0a2fb3523d75c032602ec (diff)
Avoid changing the global CPU flags in FillCPUCaps
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 70890186..6ff76d46 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -1090,7 +1090,23 @@ void alc_initconfig(void)
} while(next++);
}
}
- FillCPUCaps(capfilter);
+ if(auto cpuopt = GetCPUInfo())
+ {
+ if(!cpuopt->mVendor.empty() || !cpuopt->mName.empty())
+ {
+ TRACE("Vendor ID: \"%s\"\n", cpuopt->mVendor.c_str());
+ TRACE("Name: \"%s\"\n", cpuopt->mName.c_str());
+ }
+ const int caps{cpuopt->mCaps};
+ TRACE("Extensions:%s%s%s%s%s%s\n",
+ ((capfilter&CPU_CAP_SSE) ? ((caps&CPU_CAP_SSE) ? " +SSE" : " -SSE") : ""),
+ ((capfilter&CPU_CAP_SSE2) ? ((caps&CPU_CAP_SSE2) ? " +SSE2" : " -SSE2") : ""),
+ ((capfilter&CPU_CAP_SSE3) ? ((caps&CPU_CAP_SSE3) ? " +SSE3" : " -SSE3") : ""),
+ ((capfilter&CPU_CAP_SSE4_1) ? ((caps&CPU_CAP_SSE4_1) ? " +SSE4.1" : " -SSE4.1") : ""),
+ ((capfilter&CPU_CAP_NEON) ? ((caps&CPU_CAP_NEON) ? " +NEON" : " -NEON") : ""),
+ ((!capfilter) ? " -none-" : ""));
+ CPUCapFlags = caps & capfilter;
+ }
if(auto priopt = ConfigValueInt(nullptr, nullptr, "rt-prio"))
RTPrioLevel = *priopt;