glsl: Make use of new _mesa_glsl_parse_state::check_version() function.
authorPaul Berry <stereotype441@gmail.com>
Sun, 5 Aug 2012 16:57:01 +0000 (09:57 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 6 Dec 2012 20:13:21 +0000 (12:13 -0800)
commit0d9bba6e43ab45c8eb758b4e29f4ed085a9398c9
treedbed6d4d902330c0c10f906c49ee7fb541a0a358
parente3ded7fe628d5a842f2fae0da355a4034cff27cf
glsl: Make use of new _mesa_glsl_parse_state::check_version() function.

Previous to this patch, we were not very consistent about the errors
we generate when a shader tried to use a feature that is prohibited in
the current GLSL version.  Some error messages failed to mention the
GLSL version currently in use (or did so inaccurately), and some error
messages failed to mention the first GLSL version in which the given
feature is allowed.

This patch reworks all of the error checks to use the check_version()
function, which produces error messages in a standard form
(approximately "$FEATURE forbidden in $CURRENT_GLSL_VERSION
($REQUIRED_GLSL_VERSION required).").

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Carl Worth <cworth@cworth.org>
src/glsl/ast_function.cpp
src/glsl/ast_to_hir.cpp
src/glsl/glsl_parser.yy
src/glsl/glsl_parser_extras.h
src/glsl/hir_field_selection.cpp