glsl: Process redeclarations before initializers
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 5 Mar 2011 00:15:20 +0000 (16:15 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 5 Mar 2011 00:33:31 +0000 (16:33 -0800)
commit09a4ba0fc31fa8fc193dfb7b4fd78e32722b8312
treef79060cef6ea1eb3018fc2bad71f9ebb25a009de
parent0292ffb85c03e9fa15b9395e3875109dd8979292
glsl: Process redeclarations before initializers

If an array redeclaration includes an initializer, the initializer
would previously be dropped on the floor.  Instead, directly apply the
initializer to the correct ir_variable instance and append the
generated instructions.

Fixes bugzilla #34374 and piglit tests glsl-{vs,fs}-array-redeclaration.

NOTE: This is a candidate for stable release branches.  0292ffb8 and
8e6cb9fe are also necessary.
src/glsl/ast_to_hir.cpp