summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/VertexLoader_Position.cpp
diff options
context:
space:
mode:
authornodchip <nodchip@gmail.com>2010-02-24 23:58:48 +0000
committernodchip <nodchip@gmail.com>2010-02-24 23:58:48 +0000
commit609151c6e88380c799b8d1069387cdbc31907a35 (patch)
treef29027c1ce4c515f9a20daa25e336f75eeab400a /Source/Core/VideoCommon/Src/VertexLoader_Position.cpp
parent1b43900f30f51b765d599490c5a07a723da28344 (diff)
Reverted because of some processor and performance issue. I will develop in a branch about SSSE3/SSE4.1.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5123 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexLoader_Position.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/VertexLoader_Position.cpp34
1 files changed, 8 insertions, 26 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoader_Position.cpp b/Source/Core/VideoCommon/Src/VertexLoader_Position.cpp
index c1920a99a9..907a84cca9 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader_Position.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoader_Position.cpp
@@ -18,9 +18,7 @@
#ifndef VERTEXLOADER_POSITION_H
#define VERTEXLOADER_POSITION_H
-#include <nmmintrin.h>
#include "Common.h"
-#include "CPUDetect.h"
#include "VideoCommon.h"
#include "VertexLoader.h"
#include "VertexLoader_Position.h"
@@ -151,34 +149,18 @@ inline void Pos_ReadIndex_Short(int Index)
VertexManager::s_pCurBufferPointer += 12;
}
-static const __m128i kMaskSwap32 = _mm_set_epi32(0xFFFFFFFFL, 0x08090A0BL, 0x04050607L, 0x00010203L);
template<bool three>
inline void Pos_ReadIndex_Float(int Index)
{
const u32* pData = (const u32 *)(cached_arraybases[ARRAY_POSITION] + (Index * arraystrides[ARRAY_POSITION]));
-
- if (cpu_info.bSSE4_1) {
- const __m128i a = _mm_loadu_si128((__m128i*)pData);
- __m128i b = _mm_shuffle_epi8(a, kMaskSwap32);
- if (!three) {
- b = _mm_insert_epi32(b, 0, 2);
- }
- u8* p = VertexManager::s_pCurBufferPointer;
- _mm_storeu_si128((__m128i*)p, b);
- LOG_VTX();
- p += 12;
- VertexManager::s_pCurBufferPointer = p;
-
- } else {
- ((u32*)VertexManager::s_pCurBufferPointer)[0] = Common::swap32(pData[0]);
- ((u32*)VertexManager::s_pCurBufferPointer)[1] = Common::swap32(pData[1]);
- if (three)
- ((u32*)VertexManager::s_pCurBufferPointer)[2] = Common::swap32(pData[2]);
- else
- ((float*)VertexManager::s_pCurBufferPointer)[2] = 0.0f;
- LOG_VTX();
- VertexManager::s_pCurBufferPointer += 12;
- }
+ ((u32*)VertexManager::s_pCurBufferPointer)[0] = Common::swap32(pData[0]);
+ ((u32*)VertexManager::s_pCurBufferPointer)[1] = Common::swap32(pData[1]);
+ if (three)
+ ((u32*)VertexManager::s_pCurBufferPointer)[2] = Common::swap32(pData[2]);
+ else
+ ((float*)VertexManager::s_pCurBufferPointer)[2] = 0.0f;
+ LOG_VTX();
+ VertexManager::s_pCurBufferPointer += 12;
}
// ==============================================================================