glsl: Parse non-array uniform block instance names in GLSL ES 3.00.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 28 Nov 2012 07:45:17 +0000 (23:45 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 25 Jan 2013 14:07:33 +0000 (09:07 -0500)
commit34f966bdcb22733a159fb680859a83f88ef01d2a
tree2e43d668ad60ef98960e72bab1c77e05fd8305b0
parent0d2e6336a21e20afe37861030ac2161aadd0499e
glsl: Parse non-array uniform block instance names in GLSL ES 3.00.

In GLSL ES 3.00 (and GLSL 1.50), uniform blocks can have an associated
"instance name", which essentially namespaces the variables inside.

This patch adds basic parsing for this new feature, but doesn't yet hook
it up to actually do anything yet.

It does not support for arrays of interface blocks; a later commit will
take care of that.

This change temporarily regresses the piglit test
interface-name-access-without-interface-name.vert.  This shader failed
to compile before (the expected result), but it failed to compile for
the wrong reason.  This is not a real regression.

v2: Add some comments to ast_uniform_block::instance_name.  Suggested by
Paul Berry.

Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast.h
src/glsl/glsl_parser.yy