glsl: Slightly restructure error generation in validate_explicit_location
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 25 Sep 2013 20:53:56 +0000 (13:53 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 30 Oct 2013 20:49:30 +0000 (13:49 -0700)
commit9d6294f5a2337c5aa975c8ac65f775467b51043d
tree10a6466620c83229e37258d119219fa7aede7c77
parentf8c579dc0fc0ffed41a86daecbcfe6c3b9843e61
glsl: Slightly restructure error generation in validate_explicit_location

Use mode_string to get the name of the variable mode.  Slightly change
the control flow.  Both of these changes make it easier to support
separate shader object location layouts.

The format of the message changed because mode_string can return a
string like "shader output".  This would result in an awkward message
like "vertex shader shader output..."

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