Move the CPU capability flags to a separate header

This commit is contained in:
Chris Robinson
2018-01-11 07:19:19 -08:00
parent 9b9ec2c21a
commit 81b13f78ea
6 changed files with 23 additions and 16 deletions
+2 -1
View File
@@ -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;
+1
View File
@@ -39,6 +39,7 @@
#include "bformatdec.h"
#include "static_assert.h"
#include "cpu_caps.h"
#include "mixer_defs.h"
#include "bsinc_inc.h"
+15
View File
@@ -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 */
+4 -4
View File
@@ -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?). */
+1
View File
@@ -35,6 +35,7 @@
#include "alAuxEffectSlot.h"
#include "alu.h"
#include "cpu_caps.h"
#include "mixer_defs.h"
-11
View File
@@ -940,17 +940,6 @@ extern enum LogLevel LogLevel;
extern ALint RTPrioLevel;
extern ALuint 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(ALuint capfilter);
vector_al_string SearchDataFiles(const char *match, const char *subdir);
/* Small hack to use a pointer-to-array types as a normal argument type.