glsl: When doing algebraic simplification, make sure the type still matches.
authorEric Anholt <eric@anholt.net>
Tue, 17 Aug 2010 20:24:50 +0000 (13:24 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 17 Aug 2010 20:50:45 +0000 (13:50 -0700)
commit0e6066df633f4594fd6fb8ceeb12b15561c57a48
tree1741300d9e98bfc945b15aa2895b395461063019
parentf166d94fac8383b4c56f899ead0b7c06151e16d9
glsl: When doing algebraic simplification, make sure the type still matches.

When simplifying (vec4(1.0) / (float(x))) to rcp(float(x)), we forgot
to produce a vec4, angering ir_validate when starting alien-arena.

Fixes:
glsl-algebraic-add-zero-2
glsl-algebraic-div-one-2
glsl-algebraic-mul-one-2
glsl-algebraic-sub-zero-3
glsl-algebraic-rcp-sqrt-2
src/glsl/ir_algebraic.cpp