r698 - trunk/code/renderer

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Apr 14 15:54:56 EDT 2006


Author: tma
Date: 2006-04-14 15:54:56 -0400 (Fri, 14 Apr 2006)
New Revision: 698

Modified:
   trunk/code/renderer/tr_main.c
Log:
* Fixed radix sort on big endian platforms (from tjw, blame Timbo for the bug)


Modified: trunk/code/renderer/tr_main.c
===================================================================
--- trunk/code/renderer/tr_main.c	2006-04-08 00:58:25 UTC (rev 697)
+++ trunk/code/renderer/tr_main.c	2006-04-14 19:54:56 UTC (rev 698)
@@ -1037,11 +1037,17 @@
 static void R_RadixSort( drawSurf_t *source, int size )
 {
   static drawSurf_t scratch[ MAX_DRAWSURFS ];
-
+#ifdef Q3_LITTLE_ENDIAN
   R_Radix( 0, size, source, scratch );
   R_Radix( 1, size, scratch, source );
   R_Radix( 2, size, source, scratch );
   R_Radix( 3, size, scratch, source );
+#else
+  R_Radix( 3, size, source, scratch );
+  R_Radix( 2, size, scratch, source );
+  R_Radix( 1, size, source, scratch );
+  R_Radix( 0, size, scratch, source );
+#endif //Q3_LITTLE_ENDIAN
 }
 
 //==========================================================================================




More information about the quake3-commits mailing list