glsl: Don't convert reductions of ivec to a dot-product
glsl: Don't convert reductions of ivec to a dot-product

Mesa has an optimization that converts expressions like "v.x + v.y + v.z
+ v.w" into dot(v, 1.0).  And therein lies the rub: the other operand to
the dot-product is always a float... even if the vector is an ivec or
uvec.  This results in an assertion failure in ir_builder.

If the base type of the operand is not float, don't try the
optimization.  Dot-product is not valid on integer data.

Fixes piglit vs-integer-reduction.shader_test and OpenGL ES conformance
test ES2-CTS.gtf.GL2Tests.glGetUniform.glGetUniform.

Signed-off-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>
Reviewed-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Reviewed-by: Matt Turner <789b315743a28dd066a4ba1459c35951c291d8a6@gmail.com>
Reviewed-by: Christoph Brill <76003a65ad2176536237acdd7768cebd8cf87140@gmail.com>

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