mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
glsl/apps: Report syntax parser errors.
This commit is contained in:
parent
3f147c71ed
commit
eaa34c2dea
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue