diff options
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.h')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index 9548e62532f..cca7fa8e0ee 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -300,13 +300,15 @@ struct _mesa_glsl_parse_state { unsigned num_supported_versions; struct { unsigned ver; + uint8_t gl_ver; bool es; - } supported_versions[15]; + } supported_versions[16]; bool es_shader; unsigned language_version; unsigned forced_language_version; bool zero_init; + unsigned gl_version; gl_shader_stage stage; /** @@ -803,8 +805,19 @@ extern bool _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp, extern "C" { #endif +struct glcpp_parser; + +typedef void (*glcpp_extension_iterator)( + struct _mesa_glsl_parse_state *state, + void (*add_builtin_define)(struct glcpp_parser *, const char *, int), + struct glcpp_parser *data, + unsigned version, + bool es); + extern int glcpp_preprocess(void *ctx, const char **shader, char **info_log, - const struct gl_extensions *extensions, struct gl_context *gl_ctx); + glcpp_extension_iterator extensions, + struct _mesa_glsl_parse_state *state, + struct gl_context *gl_ctx); extern void _mesa_destroy_shader_compiler(void); extern void _mesa_destroy_shader_compiler_caches(void); |