summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_process.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-09-04 11:58:19 +0200
committerMichal Krol <[email protected]>2009-09-07 10:12:03 +0200
commitbb8f38ea6f71179cd4adb0ca33c464716be17dcb (patch)
tree9e4df396508bbbf2c764a2346ae6f33653e4d809 /src/glsl/pp/sl_pp_process.c
parentddd8ae7fbc643892b08ddf66c67bca36d42b53a6 (diff)
glsl: Implement `line' preprocessor directive.
Diffstat (limited to 'src/glsl/pp/sl_pp_process.c')
-rw-r--r--src/glsl/pp/sl_pp_process.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glsl/pp/sl_pp_process.c b/src/glsl/pp/sl_pp_process.c
index 18289790d19..5479e8a8683 100644
--- a/src/glsl/pp/sl_pp_process.c
+++ b/src/glsl/pp/sl_pp_process.c
@@ -155,6 +155,10 @@ sl_pp_process(struct sl_pp_context *context,
if (sl_pp_process_extension(context, input, first, last, &state)) {
return -1;
}
+ } else if (!strcmp(name, "line")) {
+ if (sl_pp_process_line(context, input, first, last)) {
+ return -1;
+ }
} else if (!strcmp(name, "pragma")) {
if (sl_pp_process_pragma(context, input, first, last, &state)) {
return -1;
@@ -164,7 +168,8 @@ sl_pp_process(struct sl_pp_context *context,
return -1;
}
} else {
- /* XXX: Ignore. */
+ strcpy(context->error_msg, "unrecognised directive name");
+ return -1;
}
}