projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f147c7
)
glsl/apps: Report syntax parser errors.
author
Michal Krol
<michal@vmware.com>
Fri, 13 Nov 2009 18:51:49 +0000
(19:51 +0100)
committer
Michal Krol
<michal@vmware.com>
Fri, 13 Nov 2009 18:51:49 +0000
(19:51 +0100)
src/glsl/apps/compile.c
patch
|
blob
|
history
diff --git
a/src/glsl/apps/compile.c
b/src/glsl/apps/compile.c
index f99d1413b681c5048b9366baf1b45f4c258e07b9..edc426528bd4c2ce1da3030fca882bac1e25127f 100644
(file)
--- 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);