linker: Merge global-scope instructions into main
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 13 Jul 2010 01:48:50 +0000 (18:48 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 13 Jul 2010 02:12:28 +0000 (19:12 -0700)
commit31a97868fc14d4c57681c35021571b4b61f29e20
treec5e2bc2839b5248080b4db8b2485f209a93b5014
parent15ce87e9f2d4f66ef87af693a284b3cc9fd870c1
linker: Merge global-scope instructions into main

Find instructions in all shaders that are not contained in a function
(i.e., initializers for global variables).  "Move" these instructions
to the top of the main function in the linked shader.  As a
side-effect, many global variables will also be copied into the linked
shader.
src/glsl/linker.cpp