Optimized TGSI emission in mesa