sort for drawcalls