summaryrefslogtreecommitdiff
path: root/src/glsl
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-11-13 19:51:49 +0100
committerMichal Krol <michal@vmware.com>2009-11-13 19:51:49 +0100
commiteaa34c2deac093fc23e2beed9c5580e57289b1e2 (patch)
tree4387260863708e976e0b8e85162e70e6048d5de2 /src/glsl
parent3f147c71eda9e8b8f55562f30193584b6fb74704 (diff)
glsl/apps: Report syntax parser errors.
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/apps/compile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/apps/compile.c b/src/glsl/apps/compile.c
index f99d1413b6..edc426528b 100644
--- a/src/glsl/apps/compile.c
+++ b/src/glsl/apps/compile.c
@@ -170,7 +170,7 @@ main(int argc,
}
outtokens[j] = outtokens[i];
- if (sl_cl_compile(context, outtokens, shader_type, &outbytes, &cboutbytes) == 0) {
+ if (sl_cl_compile(context, outtokens, shader_type, 1, &outbytes, &cboutbytes, errmsg, sizeof(errmsg)) == 0) {
unsigned int i;
unsigned int line = 0;
@@ -203,6 +203,9 @@ main(int argc,
}
fprintf (out, "\n");
free(outbytes);
+ } else {
+ fprintf(out, "$SYNTAXERROR: `%s'\n", errmsg);
+ return -1;
}
sl_pp_context_destroy(context);