glsl: Handle the binding qualifier for UBO variables.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Jul 2013 01:11:55 +0000 (18:11 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Jul 2013 23:57:24 +0000 (16:57 -0700)
commitbfcec4618a00621ae6ff13963e3ac82507168b4e
tree952af600168ae3e7e4f6ab03f2af1a5990aadf50
parentf25d94084ce3225e803c07672c359a4e553b0e08
glsl: Handle the binding qualifier for UBO variables.

layout(binding = N) is equivalent to calling glUniformBlockBinding(_,N).

This currently only handles the GLSL 1.40 case - no interface names, no
arrays of uniform blocks.  This is okay since we don't yet support GLSL
1.50, and don't expose ARB_shading_language_420pack in ES 3.0.

v2: Move into the other function; use binding, not constant_value.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
src/glsl/link_uniform_initializers.cpp