slang: Report syntax parser errors.
authorMichal Krol <michal@vmware.com>
Fri, 13 Nov 2009 18:51:24 +0000 (19:51 +0100)
committerMichal Krol <michal@vmware.com>
Fri, 13 Nov 2009 18:51:24 +0000 (19:51 +0100)
src/mesa/shader/slang/slang_compile.c

index 7669b7e8a6e681abafd784d8a8d0daa3d33d7106..44c889734b65bfe43ee36c5dd9c7c142f53d9456 100644 (file)
@@ -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
       {