glsl2: Conditionally define preprocessor tokens for optional extensions
The only optional extension currently supported by the compiler is GL_EXT_texture_array.
This commit is contained in:
@@ -134,10 +134,11 @@ remove_line_continuations(glcpp_parser_t *ctx, const char *shader)
|
||||
}
|
||||
|
||||
extern int
|
||||
preprocess(void *talloc_ctx, const char **shader, char **info_log)
|
||||
preprocess(void *talloc_ctx, const char **shader, char **info_log,
|
||||
const struct gl_extensions *extensions)
|
||||
{
|
||||
int errors;
|
||||
glcpp_parser_t *parser = glcpp_parser_create ();
|
||||
glcpp_parser_t *parser = glcpp_parser_create (extensions);
|
||||
*shader = remove_line_continuations(parser, *shader);
|
||||
|
||||
glcpp_lex_set_source_string (parser, *shader);
|
||||
|
Reference in New Issue
Block a user