glsl: Move built-ins to live beyond the global scope.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 23 Aug 2010 21:52:06 +0000 (14:52 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 26 Aug 2010 16:19:48 +0000 (09:19 -0700)
commita044285e25615f2d97636fe3ba47d580c3537bc4
tree54364a47e124422994d0a47ee1bd9d569f9a491d
parentb6f15869b324ae64a00d0fe46fa3c8c62c1edb6c
glsl: Move built-ins to live beyond the global scope.

Per the GLSL 1.20 specification (presumably a clarification of 1.10).

Also, when creating user functions, make a new ir_function that shadows the
built-in ir_function, rather than adding new signatures.  User functions
are supposed to hide built-ins, not overload them.

Fixes piglit tests redeclaration-{04, 12, 14}.vert.
src/glsl/ast_to_hir.cpp