aboutsummaryrefslogtreecommitdiffstats
path: root/glsl_parser_extras.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-06-16 12:18:00 -0700
committerKenneth Graunke <[email protected]>2010-06-21 11:31:54 -0700
commit04ba86a536d76ef24c749e16c785c1634b9187c9 (patch)
treeb9b1d64f0c45a59d8b1e192a3ab363df915ee14e /glsl_parser_extras.h
parent2848c4c183ea0aaca2ca0a23a13196c786403a5c (diff)
Make the main compiler call the preprocessor.
By using a single function, the main compiler doesn't need to include glcpp.h, which currently has a lot of details about the preprocessor internals. In particular, this prevents the two yacc grammars from seeing each other, which would be rather messy to sort out.
Diffstat (limited to 'glsl_parser_extras.h')
-rw-r--r--glsl_parser_extras.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/glsl_parser_extras.h b/glsl_parser_extras.h
index e1585d2872a..cad3424f6bd 100644
--- a/glsl_parser_extras.h
+++ b/glsl_parser_extras.h
@@ -101,6 +101,10 @@ extern void _mesa_glsl_warning(const YYLTYPE *locp,
_mesa_glsl_parse_state *state,
const char *fmt, ...);
+extern "C" {
+extern int preprocess(void *ctx, const char **shader, size_t *shader_len);
+}
+
extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state,
const char *string, size_t len);