diff options
author | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-06-06 09:10:55 +1000 |
---|---|---|
committer | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-10-15 21:42:24 +1100 |
commit | 8da9e154b7a2463369b32a10742af3a5695eb2ab (patch) | |
tree | e30950943935cd93f84b89b6136f022842b9f1c7 /src/glsl/glsl_parser_extras.h | |
parent | f22b7933e2e9c31b3730f5b1d9c060d2e1377d20 (diff) | |
download | external_mesa3d-8da9e154b7a2463369b32a10742af3a5695eb2ab.zip external_mesa3d-8da9e154b7a2463369b32a10742af3a5695eb2ab.tar.gz external_mesa3d-8da9e154b7a2463369b32a10742af3a5695eb2ab.tar.bz2 |
glsl: Allow arrays of arrays in GLSL ES 3.10 and GLSL 4.30
V3: use a check_*_allowed style function for requirements checking
rather than has_* which doesn't encapsulate the error message
V2: add missing 's' to the extension name in error messages
and add decimal place in version string
Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r-- | src/glsl/glsl_parser_extras.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index 7fee43e..e8740f9 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -115,6 +115,20 @@ struct _mesa_glsl_parse_state { unsigned required_glsl_es_version, YYLTYPE *locp, const char *fmt, ...) PRINTFLIKE(5, 6); + bool check_arrays_of_arrays_allowed(YYLTYPE *locp) + { + if (!(ARB_arrays_of_arrays_enable || is_version(430, 310))) { + const char *const requirement = this->es_shader + ? "GLSL ES 3.10" + : "GL_ARB_arrays_of_arrays or GLSL 4.30"; + _mesa_glsl_error(locp, this, + "%s required for defining arrays of arrays.", + requirement); + return false; + } + return true; + } + bool check_precision_qualifiers_allowed(YYLTYPE *locp) { return check_version(130, 100, locp, |