r93 - in trunk/code: client renderer

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Sep 17 10:59:28 EDT 2005


Author: ludwig
Date: 2005-09-17 10:59:28 -0400 (Sat, 17 Sep 2005)
New Revision: 93

Modified:
   trunk/code/client/snd_mix.c
   trunk/code/renderer/tr_shade.c
   trunk/code/renderer/tr_shade_calc.c
   trunk/code/renderer/tr_surface.c
Log:
apply altivec fixes from Emanuel Steen (#2383)


Modified: trunk/code/client/snd_mix.c
===================================================================
--- trunk/code/client/snd_mix.c	2005-09-17 14:20:22 UTC (rev 92)
+++ trunk/code/client/snd_mix.c	2005-09-17 14:59:28 UTC (rev 93)
@@ -22,6 +22,9 @@
 // snd_mix.c -- portable code to mix sounds for snd_dma.c
 
 #include "snd_local.h"
+#if idppc_altivec
+#include <altivec.h>
+#endif
 
 static portable_samplepair_t paintbuffer[PAINTBUFFER_SIZE];
 static int snd_vol;
@@ -301,9 +304,9 @@
 				vector signed int merge0, merge1;
 				vector signed int d0, d1, d2, d3;				
 				vector unsigned char samplePermute0 = 
-					(vector unsigned char)(0, 1, 4, 5, 0, 1, 4, 5, 2, 3, 6, 7, 2, 3, 6, 7);
+					(vector unsigned char){0, 1, 4, 5, 0, 1, 4, 5, 2, 3, 6, 7, 2, 3, 6, 7};
 				vector unsigned char samplePermute1 = 
-					(vector unsigned char)(8, 9, 12, 13, 8, 9, 12, 13, 10, 11, 14, 15, 10, 11, 14, 15);
+					(vector unsigned char){8, 9, 12, 13, 8, 9, 12, 13, 10, 11, 14, 15, 10, 11, 14, 15};
 				vector unsigned char loadPermute0, loadPermute1;
 				
 				// Rather than permute the vectors after we load them to do the sample

Modified: trunk/code/renderer/tr_shade.c
===================================================================
--- trunk/code/renderer/tr_shade.c	2005-09-17 14:20:22 UTC (rev 92)
+++ trunk/code/renderer/tr_shade.c	2005-09-17 14:59:28 UTC (rev 93)
@@ -22,6 +22,9 @@
 // tr_shade.c
 
 #include "tr_local.h"
+#if idppc_altivec
+#include <altivec.h>
+#endif
 
 /*
 
@@ -409,10 +412,10 @@
 	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

Modified: trunk/code/renderer/tr_shade_calc.c
===================================================================
--- trunk/code/renderer/tr_shade_calc.c	2005-09-17 14:20:22 UTC (rev 92)
+++ trunk/code/renderer/tr_shade_calc.c	2005-09-17 14:59:28 UTC (rev 93)
@@ -22,6 +22,9 @@
 // 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 @@
 	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;

Modified: trunk/code/renderer/tr_surface.c
===================================================================
--- trunk/code/renderer/tr_surface.c	2005-09-17 14:20:22 UTC (rev 92)
+++ trunk/code/renderer/tr_surface.c	2005-09-17 14:59:28 UTC (rev 93)
@@ -21,6 +21,9 @@
 */
 // tr_surf.c
 #include "tr_local.h"
+#if idppc_altivec
+#include <altivec.h>
+#endif
 
 /*
 




More information about the quake3-commits mailing list