Module: Mesa Branch: glsl-pp-rework-2 Commit: c9de313f1b6d0ee8d9304fc3fe11fb84ff494f12 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c9de313f1b6d0ee8d9304fc3fe11fb84ff494f12
Author: Michal Krol <[email protected]> Date: Wed Sep 16 20:28:20 2009 +0200 slang: Propagate error messages from preprocessor. --- src/mesa/shader/slang/slang_compile.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 8ea8675..19fec53 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2597,15 +2597,18 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, memset(&options, 0, sizeof(options)); if (sl_pp_purify(source, &options, &outbuf)) { + slang_info_log_error(infolog, "unable to preprocess the source"); return GL_FALSE; } if (sl_pp_context_init(&context)) { + slang_info_log_error(infolog, "out of memory"); free(outbuf); return GL_FALSE; } if (sl_pp_tokenise(&context, outbuf, &intokens)) { + slang_info_log_error(infolog, "%s", context.error_msg); sl_pp_context_destroy(&context); free(outbuf); return GL_FALSE; @@ -2614,12 +2617,14 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, free(outbuf); if (sl_pp_version(&context, intokens, &version, &tokens_eaten)) { + slang_info_log_error(infolog, "%s", context.error_msg); sl_pp_context_destroy(&context); free(intokens); return GL_FALSE; } if (sl_pp_process(&context, &intokens[tokens_eaten], &tokens)) { + slang_info_log_error(infolog, "%s", context.error_msg); sl_pp_context_destroy(&context); free(intokens); return GL_FALSE; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
