i915: Only mark a register as available if all components are written
i915: Only mark a register as available if all components are written

Previously a register would be marked as available if any component
was written.  This caused shaders such as this:

  0: TEX TEMP[0].xyz, INPUT[14].xyyy, texture[0], 2D;
  1: MUL TEMP[1], UNIFORM[0], TEMP[0].xxxx;
  2: MAD TEMP[2], UNIFORM[1], TEMP[0].yyyy, TEMP[1];
  3: MAD TEMP[1], UNIFORM[2], TEMP[0].zzzz, TEMP[2];
  4: ADD TEMP[0].xyz, TEMP[1].xyzx, UNIFORM[3].xyzx;
  5: TEX TEMP[1].w, INPUT[14].xyyy, texture[0], 2D;
  6: MOV TEMP[0].w, TEMP[1].wwww;
  7: MOV OUTPUT[2], TEMP[0];
  8: END

to produce incorrect code such as this:

  BEGIN
  DCL S[0]
  DCL T_TEX0
  R[0] = MOV T_TEX0.xyyy
  U[0] = TEXLD S[0],R[0]
  R[0].xyz = MOV U[0]
  R[1] = MUL CONST[0], R[0].xxxx
  R[2] = MAD CONST[1], R[0].yyyy, R[1]
  R[1] = MAD CONST[2], R[0].zzzz, R[2]
  R[0].xyz = ADD R[1].xyzx, CONST[3].xyzx
  R[0] = MOV T_TEX0.xyyy
  U[0] = TEXLD S[0],R[0]
  R[1].w = MOV U[0]
  R[0].w = MOV R[1].wwww
  oC = MOV R[0]
  END

Note that T_TEX0 is copied to R[0], but the xyz components of R[0] are
still expected to hold a calculated value.

Fixes piglit tests draw-elements-vs-inputs, fp-kill, and
glsl-fs-color-matrix.  It also fixes Meego bugzilla #13005.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

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