glsl: Move layout(location) checks to AST-to-HIR conversion
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 25 Sep 2013 21:36:27 +0000 (14:36 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 30 Oct 2013 20:49:30 +0000 (13:49 -0700)
commit5cb80f03142ddcc949f4d208594004cc2bcc4140
tree9a1c46daf1808acf5a4140a1445ba568b93e8bad
parent9d6294f5a2337c5aa975c8ac65f775467b51043d
glsl: Move layout(location) checks to AST-to-HIR conversion

This will simplify the addition of layout(location) qualifiers for
separate shader objects.  This was validated with new piglit tests
arb_explicit_attrib_location/1.30/compiler/not-enabled-01.vert and
arb_explicit_attrib_location/1.30/compiler/not-enabled-02.vert.

v2: Refactor error checking to check_explicit_attrib_location_allowed
and eliminate the gotos.  Suggested by Paul.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/ast_to_hir.cpp
src/glsl/glsl_parser.yy
src/glsl/glsl_parser_extras.h