Update for android build

This commit is contained in:
Xele02 2012-12-13 22:45:13 +01:00
parent 67c88d7b33
commit fc3ff5853c
3 changed files with 16 additions and 2 deletions

View File

@ -22,10 +22,10 @@
#include <numeric>
namespace {
#ifdef USE_SSE
static u32 saved_sse_state = _mm_getcsr();
static const u32 default_sse_state = _mm_getcsr();
#endif
}
namespace MathUtil
@ -116,19 +116,25 @@ namespace MathUtil
void LoadDefaultSSEState()
{
#ifdef USE_SSE
_mm_setcsr(default_sse_state);
#endif
}
void LoadSSEState()
{
#ifdef USE_SSE
_mm_setcsr(saved_sse_state);
#endif
}
void SaveSSEState()
{
#ifdef USE_SSE
saved_sse_state = _mm_getcsr();
#endif
}
inline void MatrixMul(int n, const float *a, const float *b, float *result)

View File

@ -20,7 +20,14 @@
#include "Common.h"
#ifndef ANDROID
#define USE_SSE
#endif
#ifdef USE_SSE
#include <xmmintrin.h>
#endif
#include <vector>
namespace MathUtil

View File

@ -66,6 +66,7 @@ LOCAL_SRC_FILES := \
$(SRC)/Common/Timer.cpp \
$(SRC)/Common/ThunkARM.cpp \
$(SRC)/Common/Misc.cpp \
$(SRC)/Common/MathUtil.cpp \
$(SRC)/GPU/Math3D.cpp \
$(SRC)/GPU/GPUState.cpp \
$(SRC)/GPU/GLES/Framebuffer.cpp \