glsl: Generate unique names for each const array lowered to uniforms
authorChris Forbes <chrisf@ijw.co.nz>
Tue, 18 Nov 2014 08:15:05 +0000 (21:15 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Mon, 24 Nov 2014 08:07:56 +0000 (21:07 +1300)
commit129178893b2260df22db96327c5ca9c2ce7db046
tree678cc494d49f73a39dcef55e3be0a224e61c8ad7
parentadefccd12a534f0deac7b78db73693fe1dcef2ec
glsl: Generate unique names for each const array lowered to uniforms

Uniform names (even for hidden uniforms) are required to be unique; some
parts of the compiler assume they can be looked up by name.

Fixes the piglit test: tests/spec/glsl-1.20/linker/array-initializers-1

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/lower_const_arrays_to_uniforms.cpp