From 41d5696628a5eef62cd671711b33edea9344977d Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 27 Jul 2009 16:33:16 -0700 Subject: ARB prog parser: More robust error message for bad OPTION string --- src/mesa/shader/program_parse.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/shader/program_parse.y') diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 5008446514..63a176dc8d 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; } } -- cgit v1.2.3