glsl: Track variable usage, use that to enforce semantics
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 8 Jan 2011 02:34:58 +0000 (18:34 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 12 Jan 2011 22:30:31 +0000 (14:30 -0800)
commitbd33055ef4b6dd18d6247ff7d9e47496ff4acc51
tree3278235f89711604cd0f9349ab8ea9270bbd1baa
parentc3f000b3926988124a44ce7e8cd6588e46063058
glsl: Track variable usage, use that to enforce semantics

In particular, variables cannot be redeclared invariant after being
used.

Fixes piglit test invariant-05.vert and bugzilla #29164.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
src/glsl/ast_to_hir.cpp
src/glsl/ir.cpp
src/glsl/ir.h