radeonsi/ac: move get thread id to shared code.