diff options
author | Chris Robinson <[email protected]> | 2018-05-02 21:06:57 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-05-02 21:06:57 -0700 |
commit | a19296e3cfb8b6b9e617576aba20c7d40d77dff9 (patch) | |
tree | aebaafcd2f1313521a482db5db726acb6b2134d1 /Alc | |
parent | 85c03925fb79ee4c040e2f19242308476c2c6044 (diff) |
Avoid excessive if block depths
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/helpers.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c index ae49ec14..c4fb7a8c 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -190,19 +190,13 @@ void FillCPUCaps(int capfilter) { get_cpuid(1, cpuinf[0].regs); if((cpuinf[0].regs[3]&(1<<25))) - { caps |= CPU_CAP_SSE; - if((cpuinf[0].regs[3]&(1<<26))) - { - caps |= CPU_CAP_SSE2; - if((cpuinf[0].regs[2]&(1<<0))) - { - caps |= CPU_CAP_SSE3; - if((cpuinf[0].regs[2]&(1<<19))) - caps |= CPU_CAP_SSE4_1; - } - } - } + if((caps&CPU_CAP_SSE) && (cpuinf[0].regs[3]&(1<<26))) + caps |= CPU_CAP_SSE2; + if((caps&CPU_CAP_SSE2) && (cpuinf[0].regs[2]&(1<<0))) + caps |= CPU_CAP_SSE3; + if((caps&CPU_CAP_SSE3) && (cpuinf[0].regs[2]&(1<<19))) + caps |= CPU_CAP_SSE4_1; } } #else |