aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-04-14 19:54:56 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-04-14 19:54:56 +0000
commit7c9369460fc91c066780b1f55f125c7ddb0905f9 (patch)
treeae7130f5274f0cb765e96acad245c6c4bb27ec2b /code
parent1a8ed04592f018ca660f22963366d705a62d85f8 (diff)
downloadioquake3-aero-7c9369460fc91c066780b1f55f125c7ddb0905f9.tar.gz
ioquake3-aero-7c9369460fc91c066780b1f55f125c7ddb0905f9.zip
* Fixed radix sort on big endian platforms (from tjw, blame Timbo for the bug)
git-svn-id: svn://svn.icculus.org/quake3/trunk@698 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/renderer/tr_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/code/renderer/tr_main.c b/code/renderer/tr_main.c
index 6111248..d45492c 100644
--- a/code/renderer/tr_main.c
+++ b/code/renderer/tr_main.c
@@ -1037,11 +1037,17 @@ Radix sort with 4 byte size buckets
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
}
//==========================================================================================