mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-02-17 01:31:47 +00:00
Always compile all SIMD code
Protect all SIMD implementations with the according defines and let the compiler decide if it supports the intructions. Linux will still use Simd_Generic because CPU feature runtime detection is missing.
This commit is contained in:
parent
c17b80e950
commit
8023bc5d56
11 changed files with 17 additions and 11 deletions
|
@ -47,7 +47,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
//
|
||||
//===============================================================
|
||||
|
||||
#if defined(MACOS_X) && defined(__ppc__)
|
||||
#if defined(__GNUC__) && defined(__ALTIVEC__)
|
||||
|
||||
#ifdef PPC_INTRINSICS
|
||||
// for square root estimate instruction
|
||||
|
|
|
@ -106,7 +106,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
//#define DRAWVERT_PADDED
|
||||
|
||||
class idSIMD_AltiVec : public idSIMD_Generic {
|
||||
#if defined(MACOS_X) && defined(__ppc__)
|
||||
#if defined(__GNUC__) && defined(__ALTIVEC__)
|
||||
public:
|
||||
|
||||
virtual const char * VPCALL GetName( void ) const;
|
||||
|
|
|
@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
//
|
||||
//===============================================================
|
||||
|
||||
#if defined(MACOS_X) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__MMX__)
|
||||
/*
|
||||
============
|
||||
idSIMD_MMX::GetName
|
||||
|
|
|
@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
class idSIMD_MMX : public idSIMD_Generic {
|
||||
public:
|
||||
#if defined(MACOS_X) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__MMX__)
|
||||
virtual const char * VPCALL GetName( void ) const;
|
||||
|
||||
#elif defined(_WIN32)
|
||||
|
|
|
@ -48,7 +48,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#define DRAWVERT_TANGENT1_OFFSET (ptrdiff_t(src) - ptrdiff_t(&src->tangents[1]))
|
||||
#define DRAWVERT_COLOR_OFFSET (ptrdiff_t(src) - ptrdiff_t(&src->color))
|
||||
|
||||
#if defined(MACOS_X) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__SSE__)
|
||||
|
||||
#include <xmmintrin.h>
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
class idSIMD_SSE : public idSIMD_MMX {
|
||||
public:
|
||||
#if defined(MACOS_X) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__SSE__)
|
||||
virtual const char * VPCALL GetName( void ) const;
|
||||
virtual void VPCALL Dot( float *dst, const idPlane &constant,const idDrawVert *src, const int count );
|
||||
virtual void VPCALL MinMax( idVec3 &min, idVec3 &max, const idDrawVert *src, const int *indexes, const int count );
|
||||
|
|
|
@ -40,9 +40,9 @@ If you have questions concerning this license or the applicable additional terms
|
|||
// SSE2 implementation of idSIMDProcessor
|
||||
//
|
||||
//===============================================================
|
||||
#if defined(MACOS_X) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__SSE2__)
|
||||
|
||||
#include <xmmintrin.h>
|
||||
#include <emmintrin.h>
|
||||
|
||||
#define SHUFFLEPS( x, y, z, w ) (( (x) & 3 ) << 6 | ( (y) & 3 ) << 4 | ( (z) & 3 ) << 2 | ( (w) & 3 ))
|
||||
#define R_SHUFFLEPS( x, y, z, w ) (( (w) & 3 ) << 6 | ( (z) & 3 ) << 4 | ( (y) & 3 ) << 2 | ( (x) & 3 ))
|
||||
|
|
|
@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
class idSIMD_SSE2 : public idSIMD_SSE {
|
||||
public:
|
||||
#if defined(MACOS_X) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__SSE2__)
|
||||
virtual const char * VPCALL GetName( void ) const;
|
||||
virtual void VPCALL CmpLT( byte *dst, const byte bitNum, const float *src0, const float constant, const int count );
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
//
|
||||
//===============================================================
|
||||
|
||||
#if defined(MACOS_X) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__SSE3__)
|
||||
|
||||
/*
|
||||
============
|
||||
|
|
|
@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
class idSIMD_SSE3 : public idSIMD_SSE2 {
|
||||
public:
|
||||
#if defined(MACOS_X) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__SSE3__)
|
||||
virtual const char * VPCALL GetName( void ) const;
|
||||
|
||||
#elif defined(_WIN32)
|
||||
|
|
|
@ -36,6 +36,12 @@ idlib_string = ' \
|
|||
math/Rotation.cpp \
|
||||
math/Simd.cpp \
|
||||
math/Simd_Generic.cpp \
|
||||
math/Simd_AltiVec.cpp \
|
||||
math/Simd_MMX.cpp \
|
||||
math/Simd_3DNow.cpp \
|
||||
math/Simd_SSE.cpp \
|
||||
math/Simd_SSE2.cpp \
|
||||
math/Simd_SSE3.cpp \
|
||||
math/Vector.cpp \
|
||||
BitMsg.cpp \
|
||||
LangDict.cpp \
|
||||
|
|
Loading…
Reference in a new issue