glsl: Set up uniform initializers by walking the shaders after linking.
authorEric Anholt <eric@anholt.net>
Tue, 24 Aug 2010 22:43:56 +0000 (15:43 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 24 Aug 2010 23:37:02 +0000 (16:37 -0700)
commit2f5bf20e44d509fa3afbe2cfbb9bb65347daea6a
tree52d357a3350aee48ade8ba5c42dc4e17b314b637
parent7de4d8fe11c53e59265b8a4252ab9940ffcc9929
glsl: Set up uniform initializers by walking the shaders after linking.

Previously, uniform initializers were handled by ir_to_mesa as it made
its Parameters list.  However, uniform values are global to all
shaders, and the value set in one Parameters list wasn't propagated to
the other gl_program->Parameters lists.  By going back through the
general Mesa uniform handling, we make sure that all gl_programs get
updated values, and also successfully separate uniform initializer
handling from ir_to_mesa gl_program generation.

Fixes:
glsl-uniform-initializer-5.
src/mesa/main/uniforms.c
src/mesa/main/uniforms.h
src/mesa/program/ir_to_mesa.cpp