From d726d4d4aa1f9817ed4a28fc341604545d23ad7e Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Mon, 4 Jul 2016 01:57:21 +0100 Subject: [PATCH] gsdx: Add AVX2 to instruction set test Also add a newline to the error message and report AVX/AVX2 instead of SSE5.00 and SSE5.01. --- plugins/GSdx/GSUtil.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSUtil.cpp b/plugins/GSdx/GSUtil.cpp index de309580be..376a5f0ff5 100644 --- a/plugins/GSdx/GSUtil.cpp +++ b/plugins/GSdx/GSUtil.cpp @@ -203,22 +203,31 @@ bool GSUtil::CheckSSE() { Xbyak::util::Cpu cpu; Xbyak::util::Cpu::Type type; + const char* instruction_set = ""; - #if _M_SSE >= 0x500 + #if _M_SSE >= 0x501 + type = Xbyak::util::Cpu::tAVX2; + instruction_set = "AVX2"; + #elif _M_SSE >= 0x500 type = Xbyak::util::Cpu::tAVX; + instruction_set = "AVX"; #elif _M_SSE >= 0x402 type = Xbyak::util::Cpu::tSSE42; + instruction_set = "SSE4.2"; #elif _M_SSE >= 0x401 type = Xbyak::util::Cpu::tSSE41; + instruction_set = "SSE4.1"; #elif _M_SSE >= 0x301 type = Xbyak::util::Cpu::tSSSE3; + instruction_set = "SSSE3"; #elif _M_SSE >= 0x200 type = Xbyak::util::Cpu::tSSE2; + instruction_set = "SSE2"; #endif if(!cpu.has(type)) { - fprintf(stderr, "This CPU does not support SSE %d.%02d", _M_SSE >> 8, _M_SSE & 0xff); + fprintf(stderr, "This CPU does not support %s\n", instruction_set); return false; }