diff options
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r-- | src/glsl/glsl_parser_extras.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index 5bad5a94d3c..26fdee1c14d 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -80,6 +80,16 @@ struct _mesa_glsl_parse_state { ralloc_free(mem); } + /** + * Generate a string representing the GLSL version currently being compiled + * (useful for error messages). + */ + const char *get_version_string() + { + return glsl_compute_version_string(this, this->es_shader, + this->language_version); + } + struct gl_context *const ctx; void *scanner; exec_list translation_unit; @@ -91,7 +101,6 @@ struct _mesa_glsl_parse_state { bool es_shader; unsigned language_version; - const char *version_string; enum _mesa_glsl_parser_targets target; /** |