aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program_parse.y
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-07-27 16:33:16 -0700
committerIan Romanick <[email protected]>2009-07-27 17:10:01 -0700
commit41d5696628a5eef62cd671711b33edea9344977d (patch)
tree03024b3077b3e1879dda03df316d64b7ed61666a /src/mesa/shader/program_parse.y
parent1edd13bf23c7a9dad00420f519a35f75b27e853b (diff)
ARB prog parser: More robust error message for bad OPTION string
Diffstat (limited to 'src/mesa/shader/program_parse.y')
-rw-r--r--src/mesa/shader/program_parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 5008446514d..63a176dc8da 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -284,7 +284,11 @@ option: OPTION IDENTIFIER ';'
if (!valid) {
- yyerror(& @2, state, "invalid option string");
+ const char *const err_str = (state->mode == ARB_vertex)
+ ? "invalid ARB vertex program option"
+ : "invalid ARB fragment program option";
+
+ yyerror(& @2, state, err_str);
YYERROR;
}
}