From 0df52e40ccd8f352f29dd26b427498c8b6df76bb Mon Sep 17 00:00:00 2001 From: gabest11 Date: Sat, 12 Mar 2011 23:48:32 +0000 Subject: [PATCH] GSdx: one more fix for vs2008. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4426 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSVector.cpp | 2 +- plugins/GSdx/GSVector.h | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) 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;