Correctly detect SSE/SSE2 and AVX support, even on the non-Intel processor.

This commit is contained in:
LoRd_MuldeR 2022-10-08 22:49:20 +02:00
parent c1ef577e97
commit 299f4070aa
2 changed files with 3 additions and 8 deletions

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 0
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 4
#define VER_LAMEXP_BUILD 2345
#define VER_LAMEXP_BUILD 2346
#define VER_LAMEXP_CONFG 2188
///////////////////////////////////////////////////////////////////////////////

View File

@ -358,9 +358,8 @@ double InitializationThread::doInit(const size_t threadCount)
delay();
//CPU type selection
unsigned int cpuSupport = 0;
const bool haveSSE2 = (m_cpuFeatures.features & MUtils::CPUFetaures::FLAG_SSE) && (m_cpuFeatures.features & MUtils::CPUFetaures::FLAG_SSE2);
if(haveSSE2 && (m_cpuFeatures.vendor & MUtils::CPUFetaures::VENDOR_INTEL))
unsigned int cpuSupport = m_cpuFeatures.x64 ? CPU_TYPE_X64_GEN : CPU_TYPE_X86_GEN;
if((m_cpuFeatures.features & MUtils::CPUFetaures::FLAG_SSE) && (m_cpuFeatures.features & MUtils::CPUFetaures::FLAG_SSE2))
{
if (m_cpuFeatures.features & MUtils::CPUFetaures::FLAG_AVX)
{
@ -371,10 +370,6 @@ double InitializationThread::doInit(const size_t threadCount)
cpuSupport = m_cpuFeatures.x64 ? CPU_TYPE_X64_SSE : CPU_TYPE_X86_SSE;
}
}
else
{
cpuSupport = m_cpuFeatures.x64 ? CPU_TYPE_X64_GEN : CPU_TYPE_X86_GEN;
}
//Hack to disable x64 on Wine, as x64 binaries won't run under Wine (tested with Wine 1.4 under Ubuntu 12.04 x64)
if(cpuSupport & CPU_TYPE_X64_ALL)