diff --git a/plugins/GSdx/GSVector.cpp b/plugins/GSdx/GSVector.cpp index acc7a004e2..d07baa4a56 100644 --- a/plugins/GSdx/GSVector.cpp +++ b/plugins/GSdx/GSVector.cpp @@ -78,4 +78,4 @@ GSVector4i GSVector4i::fit(int preset) const } return r; -} +} \ No newline at end of file diff --git a/plugins/GSdx/GSVector.h b/plugins/GSdx/GSVector.h index 92d495eb0b..67999b9a0c 100644 --- a/plugins/GSdx/GSVector.h +++ b/plugins/GSdx/GSVector.h @@ -960,12 +960,19 @@ public: __forceinline bool eq(const GSVector4i& v) const { #if _M_SSE >= 0x401 + // pxor, ptest, je + GSVector4i t = *this ^ v; + return _mm_testz_si128(t, t) != 0; + #else + // pcmpeqd, pmovmskb, cmp, je + return eq32(v).alltrue(); + #endif } @@ -2656,10 +2663,16 @@ public: __forceinline bool allfalse() const { - #if _M_SSE >= 0x401 + #if _M_SSE >= 0x500 return _mm_testz_ps(m, m) != 0; + #elif _M_SSE >= 0x401 + + __m128i a = _mm_castps_si128(m); + + return _mm_testz_si128(a, a) != 0; + #else return mask() == 0; @@ -3758,10 +3771,17 @@ public: __forceinline bool allfalse() const { - #if _M_SSE >= 0x401 + #if _M_SSE >= 0x500 return (_mm_testz_ps(m[0], m[0]) & _mm_testz_ps(m[1], m[1])) != 0; + #elif _M_SSE >= 0x401 + + __m128i a = _mm_castps_si128(m[0]); + __m128i b = _mm_castps_si128(m[1]); + + return (_mm_testz_si128(a, a) & _mm_testz_si128(b, b)) != 0; + #else return mask() == 0;