summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/pp.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-06-30 16:27:22 -0700
committerIan Romanick <[email protected]>2010-07-01 20:40:08 -0700
commit06143ea09411aa283ac3633bfbfa4326584cd952 (patch)
tree9823df6abda22c93745029eecd930e85fd9241f7 /src/glsl/glcpp/pp.c
parent2d1223611700b33aab084f1927bfc1ff1b284115 (diff)
glsl2: Conditionally define preprocessor tokens for optional extensions
The only optional extension currently supported by the compiler is GL_EXT_texture_array.
Diffstat (limited to 'src/glsl/glcpp/pp.c')
-rw-r--r--src/glsl/glcpp/pp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glsl/glcpp/pp.c b/src/glsl/glcpp/pp.c
index a25b7b72a6b..1ce829a2c97 100644
--- a/src/glsl/glcpp/pp.c
+++ b/src/glsl/glcpp/pp.c
@@ -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);