v3d/compiler: Fix sorting the gs and fs inputs