mesa: revamp GLSL instruction emit code
mesa: revamp GLSL instruction emit code

This is a step toward better array handling code.  In particular, when more
than one operand of an instruction uses indirect addressing, we'll need some
temporary instructions and registers.  By converting IR storage to instruction
operands all in one place (emit_instruction()) we can be smarter about this.

Also, somewhat better handling of dst register swizzle/writemask handling.
This results in tighter writemasks on some instructions which is good for
SOA execution.

And, cleaner instruction commenting with inst_comment().

Next: remove some more dead code and additional clean-ups...

(cherry picked from commit 3a7ed9779b159f9dccbc98d1d556be2cd83cc1fd)

bkaradzic/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,KTXSoftware/glsl2agal,wolf96/glsl-optimizer,djreep81/glsl-optimizer,mcanthony/glsl-optimizer,adobe/glsl2agal,zz85/glsl-optimizer,metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,zeux/glsl-optimizer,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,KTXSoftware/glsl2agal,metora/MesaGLSLCompiler,KTXSoftware/glsl2agal,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,adobe/glsl2agal,mcanthony/glsl-optimizer,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,KTXSoftware/glsl2agal,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,adobe/glsl2agal,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,adobe/glsl2agal,jbarczak/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,KTXSoftware/glsl2agal,adobe/glsl2agal,zz85/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer