mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-28 06:52:35 +00:00
* Fixed radix sort on big endian platforms (from tjw, blame Timbo for the bug)
This commit is contained in:
parent
08f44d8247
commit
a596185844
1 changed files with 7 additions and 1 deletions
|
@ -1037,11 +1037,17 @@ Radix sort with 4 byte size buckets
|
||||||
static void R_RadixSort( drawSurf_t *source, int size )
|
static void R_RadixSort( drawSurf_t *source, int size )
|
||||||
{
|
{
|
||||||
static drawSurf_t scratch[ MAX_DRAWSURFS ];
|
static drawSurf_t scratch[ MAX_DRAWSURFS ];
|
||||||
|
#ifdef Q3_LITTLE_ENDIAN
|
||||||
R_Radix( 0, size, source, scratch );
|
R_Radix( 0, size, source, scratch );
|
||||||
R_Radix( 1, size, scratch, source );
|
R_Radix( 1, size, scratch, source );
|
||||||
R_Radix( 2, size, source, scratch );
|
R_Radix( 2, size, source, scratch );
|
||||||
R_Radix( 3, size, scratch, source );
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================================
|
//==========================================================================================
|
||||||
|
|
Loading…
Reference in a new issue