r300: fix vertex program bug
r300: fix vertex program bug

If the vertex program didn't write position attribute, the position invariant function would add necessary instructions, but the vertex position would be overwritten by artificial outputs insts added to satisfy fragment program requirements.

Fixes "whole screen is gray" problem for HW TCL path in sauerbraten when shaders are enabled, and whole slew of wine d3d9 tests.

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