aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-11 07:19:19 -0800
committerChris Robinson <[email protected]>2018-01-11 07:19:19 -0800
commit81b13f78ea27aaa6704457124931148244fd1614 (patch)
tree781abb42054d9c2e51fdc1aefc44d1ad81d265d7 /Alc
parent9b9ec2c21a7f0992a6ca64ac9cb2a03838e11cd7 (diff)
Move the CPU capability flags to a separate header
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c3
-rw-r--r--Alc/ALu.c1
-rw-r--r--Alc/cpu_caps.h15
-rw-r--r--Alc/helpers.c8
-rw-r--r--Alc/mixer.c1
5 files changed, 23 insertions, 5 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 3de59521..34cb63d4 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -41,6 +41,7 @@
#include "bformatdec.h"
#include "alu.h"
+#include "cpu_caps.h"
#include "compat.h"
#include "threads.h"
#include "alstring.h"
@@ -900,7 +901,7 @@ static void alc_init(void)
static void alc_initconfig(void)
{
const char *devs, *str;
- ALuint capfilter;
+ int capfilter;
float valf;
int i, n;
diff --git a/Alc/ALu.c b/Alc/ALu.c
index bd1bf79a..e0496513 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -39,6 +39,7 @@
#include "bformatdec.h"
#include "static_assert.h"
+#include "cpu_caps.h"
#include "mixer_defs.h"
#include "bsinc_inc.h"
diff --git a/Alc/cpu_caps.h b/Alc/cpu_caps.h
new file mode 100644
index 00000000..328d470e
--- /dev/null
+++ b/Alc/cpu_caps.h
@@ -0,0 +1,15 @@
+#ifndef CPU_CAPS_H
+#define CPU_CAPS_H
+
+extern int CPUCapFlags;
+enum {
+ CPU_CAP_SSE = 1<<0,
+ CPU_CAP_SSE2 = 1<<1,
+ CPU_CAP_SSE3 = 1<<2,
+ CPU_CAP_SSE4_1 = 1<<3,
+ CPU_CAP_NEON = 1<<4,
+};
+
+void FillCPUCaps(int capfilter);
+
+#endif /* CPU_CAPS_H */
diff --git a/Alc/helpers.c b/Alc/helpers.c
index 7f6349b3..0f69b29e 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -108,6 +108,7 @@ DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x
#include "alMain.h"
#include "alu.h"
+#include "cpu_caps.h"
#include "atomic.h"
#include "uintmap.h"
#include "vector.h"
@@ -124,12 +125,11 @@ extern inline ALuint64 ScaleCeil(ALuint64 val, ALuint64 new_scale, ALuint64 old_
extern inline ALint fastf2i(ALfloat f);
-ALuint CPUCapFlags = 0;
+int CPUCapFlags = 0;
-
-void FillCPUCaps(ALuint capfilter)
+void FillCPUCaps(int capfilter)
{
- ALuint caps = 0;
+ int caps = 0;
/* FIXME: We really should get this for all available CPUs in case different
* CPUs have different caps (is that possible on one machine?). */
diff --git a/Alc/mixer.c b/Alc/mixer.c
index d99a4a8f..3d1da58f 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -35,6 +35,7 @@
#include "alAuxEffectSlot.h"
#include "alu.h"
+#include "cpu_caps.h"
#include "mixer_defs.h"