aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2014-06-04 02:57:13 -0700
committerChris Robinson <[email protected]>2014-06-06 07:15:00 -0700
commitfc0be88c0f8d3d8887edd2afac915840f4e3f5e4 (patch)
treedbe626f58eff02c0b34ddaa7ec09fa3de4c10f35 /Alc/ALc.c
parent3b2fcb3ef6f00d026f06ca154060b29ded3eb3fc (diff)
Add SSE2 and SSE4.1 linear resamplers
Currently the only way SSE 4.1 is detected is by using __get_cpuid, i.e. with GCC. Windows' IsProcessorFeaturePresent does not report SSE4.1 capabilities.
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 3b3e5397..7c8c2322 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -909,8 +909,12 @@ static void alc_initconfig(void)
ReadALConfig();
capfilter = 0;
-#ifdef HAVE_SSE
+#if defined(HAVE_SSE4_1)
+ capfilter |= CPU_CAP_SSE | CPU_CAP_SSE2 | CPU_CAP_SSE4_1;
+#elif defined(HAVE_SSE2)
capfilter |= CPU_CAP_SSE | CPU_CAP_SSE2;
+#elif defined(HAVE_SSE)
+ capfilter |= CPU_CAP_SSE;
#endif
#ifdef HAVE_NEON
capfilter |= CPU_CAP_NEON;
@@ -940,6 +944,8 @@ static void alc_initconfig(void)
capfilter &= ~CPU_CAP_SSE;
else if(len == 4 && strncasecmp(str, "sse2", len) == 0)
capfilter &= ~CPU_CAP_SSE2;
+ else if(len == 6 && strncasecmp(str, "sse4.1", len) == 0)
+ capfilter &= ~CPU_CAP_SSE4_1;
else if(len == 4 && strncasecmp(str, "neon", len) == 0)
capfilter &= ~CPU_CAP_NEON;
else