Sort register lists by register type first, then register number.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 09 Jul 2016 01:44:57 -0400
changeset 1179 6dd73a80629b
parent 1178 03f0ef912406
child 1180 8abc040525ed
Sort register lists by register type first, then register number.

This groups all the registers by type first, which is useful for packing
heterogeneous uniform buffers later.
mojoshader.c
--- a/mojoshader.c	Sun May 29 13:31:18 2016 -0400
+++ b/mojoshader.c	Sat Jul 09 01:44:57 2016 -0400
@@ -527,7 +527,7 @@
 
 static inline uint32 reg_to_ui32(const RegisterType regtype, const int regnum)
 {
-    return ( ((uint32) regtype) | (((uint32) regnum) << 16) );
+    return ( ((uint32) regnum) | (((uint32) regtype) << 16) );
 } // reg_to_uint32
 
 // !!! FIXME: ditch this for a hash table.