glsl: Set initial values for uniforms in the linker
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 6 Apr 2012 21:06:13 +0000 (14:06 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 23 May 2012 18:41:49 +0000 (11:41 -0700)
commita2e623054b5d8eafebc7499efe93e4bceae16ead
tree2faf92102faadd7f3113bd87bcc74d7f93335377
parent29362875f2613ad87abe7725ce3c56c36d16cf9b
glsl: Set initial values for uniforms in the linker

v2: Fix handling of arrays-of-structure.  Thanks to Eric Anholt for
pointing this out.

v3: Minor comment change based on feedback from Ken.

Fixes piglit glsl-1.20/execution/uniform-initializer/fs-structure-array
and glsl-1.20/execution/uniform-initializer/vs-structure-array.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/Makefile.sources
src/glsl/link_uniform_initializers.cpp [new file with mode: 0644]
src/glsl/link_uniforms.cpp
src/glsl/linker.h