Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
icculus committed Jul 9, 2016
1 parent ab98d7f commit 6492ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader.c
Expand Up @@ -527,7 +527,7 @@ static void free_reglist(MOJOSHADER_free f, void *d, RegisterList *item)

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.
Expand Down

0 comments on commit 6492ddf

Please sign in to comment.