Mesa (glsl-pp-rework-2): slang: Report syntax parser errors.

Michał Król michal at kemper.freedesktop.org
Tue Nov 17 08:19:24 UTC 2009


Module: Mesa
Branch: glsl-pp-rework-2
Commit: 3f147c71eda9e8b8f55562f30193584b6fb74704
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f147c71eda9e8b8f55562f30193584b6fb74704

Author: Michal Krol <michal at vmware.com>
Date:   Fri Nov 13 19:51:24 2009 +0100

slang: Report syntax parser errors.

---

 src/mesa/shader/slang/slang_compile.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 7669b7e..44c8897 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -2722,17 +2722,22 @@ compile_with_grammar(const char *source,
    }
 
    /* Finally check the syntax and generate its binary representation. */
-   result = sl_cl_compile(context, tokens, shader_type, &prod, &size);
+   result = sl_cl_compile(context,
+                          tokens,
+                          shader_type,
+                          parsing_builtin,
+                          &prod,
+                          &size,
+                          errmsg,
+                          sizeof(errmsg));
 
    sl_pp_context_destroy(context);
    free(tokens);
 
    if (result) {
-      /*char buf[1024];
-      GLint pos;*/
+      /*GLint pos;*/
 
-      /*slang_info_log_error(infolog, buf);*/
-      slang_info_log_error(infolog, "Syntax error.");
+      slang_info_log_error(infolog, errmsg);
       /* syntax error (possibly in library code) */
 #if 0
       {




More information about the mesa-commit mailing list