glsl: Refactor uniform block parser rules.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 28 Nov 2012 07:21:56 +0000 (23:21 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 25 Jan 2013 14:07:33 +0000 (09:07 -0500)
commit0d2e6336a21e20afe37861030ac2161aadd0499e
treefa9f9fc92eba8c2e9b35d6e23c81ffe8857cc7bd
parentb226a058dbb59a24254a149be182a08bcb10bee3
glsl: Refactor uniform block parser rules.

The existing code has a lot of duplication; the only difference between
the two cases is whether we merge in an additional layout qualifier.

Apparently creating a layout_qualifieropt rule that can be empty causes
a lot of conflicts and confusion.  However, refactoring out the guts of
the ast_uniform_block creation works fine.

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/glsl_parser.yy