glsl: Fix gl_NormalMatrix swizzle setup to match i965's invariants.
glsl: Fix gl_NormalMatrix swizzle setup to match i965's invariants.

A driver trying to set up builtin uniforms is faced with a problem:
How do I walk the ir_variable structure (representing an array of
structs, or array of matrices, or struct, or whatever), and set up
driver structures so that dereference of that uniform gets the
corresponding ParameterValues[] entry.  The rule in general is that
each corresponding vector-sized field of an array of structs is one
builtin uniform state slot.  i965 relied on another invariant: each
state slot has a number of unique channel swizzles corresponding to
the number of elements in the field's vector, to avoid needing to walk
the glsl_type in parallel to get at vector_elements.

All of the builtin uniforms followed this behavior, except for
gl_NormalMatrix.  That's a mat3 (so 3 vec3s), but it was swizzled as 3
vec4s.

Fixes piglit glsl-fs-normalmatrix.
Reviewed-by: Paul Berry <de21b9f22e6dd0bdf7890875d6e07ef4967c44ce@gmail.com>

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