slang: Update for glsl/pp interface changes.
authorMichal Krol <michal@vmware.com>
Mon, 9 Nov 2009 23:16:09 +0000 (00:16 +0100)
committerMichal Krol <michal@vmware.com>
Mon, 9 Nov 2009 23:16:09 +0000 (00:16 +0100)
src/mesa/shader/slang/slang_compile.c

index ce3a85e..b8b7b3d 100644 (file)
@@ -2589,12 +2589,14 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit,
    int result;
    struct sl_pp_purify_options options;
    char *outbuf;
+   char errmsg[200] = "";
+   unsigned int errline = 0;
    struct sl_pp_token_info *intokens;
    unsigned int tokens_eaten;
 
    memset(&options, 0, sizeof(options));
-   if (sl_pp_purify(source, &options, &outbuf)) {
-      slang_info_log_error(infolog, "unable to preprocess the source");
+   if (sl_pp_purify(source, &options, &outbuf, errmsg, sizeof(errmsg), &errline)) {
+      slang_info_log_error(infolog, errmsg);
       return GL_FALSE;
    }