glsl: Inherrit type of declared variable from initializer
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 8 Dec 2010 00:27:22 +0000 (16:27 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 8 Dec 2010 00:36:44 +0000 (16:36 -0800)
commitb0fc5103cbc9116806a9888f747baed4b8166246
treef9de81e28e55be5a5291ae37bc5133dd09bacd06
parent7ca7e9b626389dd6dac683c6664b8478e6d5c3b9
glsl: Inherrit type of declared variable from initializer

Types of declared variables and their initializer must match excatly
except for unsized arrays.  Previously the type inherritance for
unsized arrays happened implicitly in the emitted assignment.
However, this assignment is never emitted for uniforms.  Now that type
is explicitly copied unconditionally.

Fixes piglit test array-compare-04.vert (bugzilla #32035) and
glsl-array-uniform-length (bugzilla #31985).

NOTE: This is a candidate for the 7.9 branch.
src/glsl/ast_to_hir.cpp