From 299f4070aa55b4bc69080e3a462ac7f59b8d7992 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sat, 8 Oct 2022 22:49:20 +0200 Subject: [PATCH] Correctly detect SSE/SSE2 and AVX support, even on the non-Intel processor. --- src/Config.h | 2 +- src/Thread_Initialization.cpp | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Config.h b/src/Config.h index c5575b91..1a8429dd 100644 --- a/src/Config.h +++ b/src/Config.h @@ -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 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Thread_Initialization.cpp b/src/Thread_Initialization.cpp index 8061d162..b40be876 100644 --- a/src/Thread_Initialization.cpp +++ b/src/Thread_Initialization.cpp @@ -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)