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.
This commit is contained in:
Jonathan Li 2016-07-04 01:57:21 +01:00
parent b8c1fa9b43
commit d726d4d4aa
1 changed files with 11 additions and 2 deletions

View File

@ -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;
}