diff options
author | Ian Romanick <[email protected]> | 2009-07-27 16:33:16 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2009-07-27 17:10:01 -0700 |
commit | 41d5696628a5eef62cd671711b33edea9344977d (patch) | |
tree | 03024b3077b3e1879dda03df316d64b7ed61666a /src/mesa/shader/program_parse.y | |
parent | 1edd13bf23c7a9dad00420f519a35f75b27e853b (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.y | 6 |
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; } } |