mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
glsl/apps: Predefine __GLSL_PP_PREDEFINED_MACRO_TEST for testing.
This commit is contained in:
parent
22200bcafc
commit
417f36ccb0
1 changed files with 10 additions and 0 deletions
|
|
@ -132,6 +132,16 @@ main(int argc,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sl_pp_context_add_predefined(context, "__GLSL_PP_PREDEFINED_MACRO_TEST", "1")) {
|
||||||
|
fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
|
||||||
|
|
||||||
|
printf("Error: %s\n", sl_pp_context_error_message(context));
|
||||||
|
sl_pp_context_destroy(context);
|
||||||
|
free(tokens);
|
||||||
|
fclose(out);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) {
|
if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) {
|
||||||
fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
|
fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue