diff options
author | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-09-17 14:59:28 +0000 |
---|---|---|
committer | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-09-17 14:59:28 +0000 |
commit | ff4134a20ff8ff484bc1a9cfd98c4eebe1eadecf (patch) | |
tree | 8bb6ef50a80dd700d749216b705b0f212ad1485e /code/renderer | |
parent | 4683c255ae5ba1f858d1b010d46a42e662029794 (diff) | |
download | ioquake3-aero-ff4134a20ff8ff484bc1a9cfd98c4eebe1eadecf.tar.gz ioquake3-aero-ff4134a20ff8ff484bc1a9cfd98c4eebe1eadecf.zip |
apply altivec fixes from Emanuel Steen (#2383)
git-svn-id: svn://svn.icculus.org/quake3/trunk@93 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/renderer')
-rw-r--r-- | code/renderer/tr_shade.c | 7 | ||||
-rw-r--r-- | code/renderer/tr_shade_calc.c | 7 | ||||
-rw-r--r-- | code/renderer/tr_surface.c | 3 |
3 files changed, 13 insertions, 4 deletions
diff --git a/code/renderer/tr_shade.c b/code/renderer/tr_shade.c index e6f8688..d2b164b 100644 --- a/code/renderer/tr_shade.c +++ b/code/renderer/tr_shade.c @@ -22,6 +22,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // tr_shade.c #include "tr_local.h" +#if idppc_altivec +#include <altivec.h> +#endif /* @@ -409,10 +412,10 @@ static void ProjectDlightTexture( void ) { vector short colorShort; vector signed int colorInt; vector unsigned char floatColorVecPerm, modulatePerm, colorChar; - vector unsigned char vSel = (vector unsigned char)(0x00, 0x00, 0x00, 0xff, + vector unsigned char vSel = (vector unsigned char){0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0xff); + 0x00, 0x00, 0x00, 0xff}; #else vec3_t origin; #endif diff --git a/code/renderer/tr_shade_calc.c b/code/renderer/tr_shade_calc.c index f6a1171..b97f674 100644 --- a/code/renderer/tr_shade_calc.c +++ b/code/renderer/tr_shade_calc.c @@ -22,6 +22,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // tr_shade_calc.c #include "tr_local.h" +#if idppc_altivec +#include <altivec.h> +#endif #define WAVEVALUE( table, base, amplitude, phase, freq ) ((base) + table[ myftol( ( ( (phase) + tess.shaderTime * (freq) ) * FUNCTABLE_SIZE ) ) & FUNCTABLE_MASK ] * (amplitude)) @@ -1106,10 +1109,10 @@ void RB_CalcDiffuseColor( unsigned char *colors ) vec3_t directedLight; int numVertexes; #if idppc_altivec - vector unsigned char vSel = (vector unsigned char)(0x00, 0x00, 0x00, 0xff, + vector unsigned char vSel = (vector unsigned char){0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0xff); + 0x00, 0x00, 0x00, 0xff}; vector float ambientLightVec; vector float directedLightVec; vector float lightDirVec; diff --git a/code/renderer/tr_surface.c b/code/renderer/tr_surface.c index e3f0051..2f4d1c9 100644 --- a/code/renderer/tr_surface.c +++ b/code/renderer/tr_surface.c @@ -21,6 +21,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // tr_surf.c #include "tr_local.h" +#if idppc_altivec +#include <altivec.h> +#endif /* |