diff --git a/plugins/GSdx/GSVector.h b/plugins/GSdx/GSVector.h index 4fe05cfea7..a9d21c27c5 100644 --- a/plugins/GSdx/GSVector.h +++ b/plugins/GSdx/GSVector.h @@ -3810,7 +3810,8 @@ public: template __forceinline GSVector8i sll() const { - return GSVector8i(_mm256_slli_si128(m, i)); + return GSVector8i(_mm256_slli_si256(m, i)); + //return GSVector8i(_mm256_slli_si128(m, i)); } __forceinline GSVector8i sra16(int i) const @@ -4260,17 +4261,17 @@ public: return cast(v0).insert<1>(v1); } - template<> __forceinline GSVector8i gather32_32(const uint8* ptr) const + __forceinline GSVector8i gather32_32(const uint8* ptr) const { return GSVector8i(_mm256_i32gather_epi32((const int*)ptr, m, 1)) & GSVector8i::x000000ff(); } - template<> __forceinline GSVector8i gather32_32(const uint16* ptr) const + __forceinline GSVector8i gather32_32(const uint16* ptr) const { return GSVector8i(_mm256_i32gather_epi32((const int*)ptr, m, 2)) & GSVector8i::x0000ffff(); } - template<> __forceinline GSVector8i gather32_32(const uint32* ptr) const + __forceinline GSVector8i gather32_32(const uint32* ptr) const { return GSVector8i(_mm256_i32gather_epi32((const int*)ptr, m, 4)); } @@ -4296,12 +4297,12 @@ public: return cast(v0).insert<1>(v1); } - template<> __forceinline GSVector8i gather32_32(const uint8* ptr1, const uint32* ptr2) const + __forceinline GSVector8i gather32_32(const uint8* ptr1, const uint32* ptr2) const { return gather32_32(ptr1).gather32_32(ptr2); } - template<> __forceinline GSVector8i gather32_32(const uint32* ptr1, const uint32* ptr2) const + __forceinline GSVector8i gather32_32(const uint32* ptr1, const uint32* ptr2) const { return gather32_32(ptr1).gather32_32(ptr2); } diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index bec5ec3e00..02626f8dad 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -263,6 +263,14 @@ struct aligned_free_second {template void operator()(T& p) {_aligned_fr #endif // sse +#ifndef _WINDOWS +// Convert gcc see define into GSdx (windows) define +#if defined(__AVX2__) + #define _M_SSE 0x501 +#elif defined(__AVX__) + #define _M_SSE 0x500 +#endif +#endif #if !defined(_M_SSE) && (!defined(_WINDOWS) || defined(_M_AMD64) || defined(_M_IX86_FP) && _M_IX86_FP >= 2)