glsl: Add validation for the "binding" qualifier.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 16 Jul 2013 19:03:28 +0000 (12:03 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Jul 2013 23:57:23 +0000 (16:57 -0700)
commit5e5e12040beb40ff93797d55c913ebe6cd00c2ae
tree089c08f2de05c0a6985414dc761ad653bd86db14
parent0418846a07b02d39e129987580e7ea50fb422ee0
glsl: Add validation for the "binding" qualifier.

The "binding" qualifier only applies to UBO blocks and samplers, along
with arrays of those types.  (It would also apply to images and atomic
counters, but we don't support those yet.)

This also validates sampler bindings against the maximum number of
texture units, and UBO bindings against the number of uniform buffer
binding points.

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