From d541a8da4570b41cee509c0dd52d483e75b4a373 Mon Sep 17 00:00:00 2001 From: gabest11 Date: Tue, 10 Mar 2009 04:37:41 +0000 Subject: [PATCH] GSdx: sse2/ssse3 build fixed git-svn-id: http://pcsx2.googlecode.com/svn/trunk@730 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSVector.cpp | 2 ++ plugins/GSdx/GSVector.h | 9 ++++++--- plugins/GSdx/sse.h | 3 --- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/GSdx/GSVector.cpp b/plugins/GSdx/GSVector.cpp index a684fb9f31..18a2e9fcc1 100644 --- a/plugins/GSdx/GSVector.cpp +++ b/plugins/GSdx/GSVector.cpp @@ -24,6 +24,8 @@ const GSVector4 GSVector4::m_ps0123(0.0f, 1.0f, 2.0f, 3.0f); const GSVector4 GSVector4::m_ps4567(4.0f, 5.0f, 6.0f, 7.0f); +const GSVector4 GSVector4::m_x3f800000(_mm_castsi128_ps(_mm_set1_epi32(0x3f800000))); +const GSVector4 GSVector4::m_x4b000000(_mm_castsi128_ps(_mm_set1_epi32(0x4b000000))); void GSVector4::operator = (const GSVector4i& v) { diff --git a/plugins/GSdx/GSVector.h b/plugins/GSdx/GSVector.h index 1de9c74c16..1d98b97822 100644 --- a/plugins/GSdx/GSVector.h +++ b/plugins/GSdx/GSVector.h @@ -2093,6 +2093,9 @@ public: static const GSVector4 m_ps0123; static const GSVector4 m_ps4567; + static const GSVector4 m_x3f800000; + static const GSVector4 m_x4b000000; + GSVector4() { } @@ -2225,18 +2228,18 @@ public: GSVector4 a = *this; - GSVector4 b = (a & GSVector4(ps_80000000)) | GSVector4(ps_4b000000); + GSVector4 b = (a & cast(GSVector4i::x80000000())) | m_x4b000000; b = a + b - b; if((mode & 7) == (NegInf & 7)) { - return b - ((a < b) & GSVector4(ps_3f800000)); + return b - ((a < b) & m_x3f800000); } if((mode & 7) == (PosInf & 7)) { - return b + ((a > b) & GSVector4(ps_3f800000)); + return b + ((a > b) & m_x3f800000); } ASSERT((mode & 7) == (NearestInt & 7)); // other modes aren't implemented diff --git a/plugins/GSdx/sse.h b/plugins/GSdx/sse.h index e334c5bb01..d1b35dd2d7 100644 --- a/plugins/GSdx/sse.h +++ b/plugins/GSdx/sse.h @@ -45,9 +45,6 @@ #endif - const __m128 ps_3f800000 = _mm_castsi128_ps(_mm_set1_epi32(0x3f800000)); - const __m128 ps_4b000000 = _mm_castsi128_ps(_mm_set1_epi32(0x4b000000)); - #define _MM_TRANSPOSE4_SI128(row0, row1, row2, row3) \ { \ __m128 tmp0 = _mm_shuffle_ps(_mm_castsi128_ps(row0), _mm_castsi128_ps(row1), 0x44); \