}
extern int
-preprocess(void *talloc_ctx, const char **shader)
+preprocess(void *talloc_ctx, const char **shader, char **info_log)
{
int errors;
glcpp_parser_t *parser = glcpp_parser_create ();
glcpp_parser_parse (parser);
- printf("%s", parser->info_log);
+ *info_log = talloc_strdup_append(*info_log, parser->info_log);
talloc_steal(talloc_ctx, parser->output);
*shader = parser->output;
const char *fmt, ...);
extern "C" {
-extern int preprocess(void *ctx, const char **shader);
+extern int preprocess(void *ctx, const char **shader, char **info_log);
}
extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state,
* should probably be the parser context, but there isn't one yet.
*/
const char *source = shader->Source;
- state.error = preprocess(shader, &source);
+ state.error = preprocess(shader, &source, &state.info_log);
if (!state.error) {
_mesa_glsl_lexer_ctor(& state, source);