Mesa (master): mesa: emit more info in program parser error message

Brian Paul brianp at kemper.freedesktop.org
Wed Apr 27 10:59:05 PDT 2011


Module: Mesa
Branch: master
Commit: f3c92c2323b1a00e592a2bae739c420a52d4285b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f3c92c2323b1a00e592a2bae739c420a52d4285b

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Apr 27 09:23:16 2011 -0600

mesa: emit more info in program parser error message

---

 src/mesa/program/program_parse.y |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index 85c783d..dbf5aba 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -1258,7 +1258,11 @@ optArraySize:
 	| INTEGER
         {
 	   if (($1 < 1) || ((unsigned) $1 > state->limits->MaxParameters)) {
-	      yyerror(& @1, state, "invalid parameter array size");
+              char msg[100];
+              _mesa_snprintf(msg, sizeof(msg),
+                             "invalid parameter array size (size=%d max=%u)",
+                             $1, state->limits->MaxParameters);
+	      yyerror(& @1, state, msg);
 	      YYERROR;
 	   } else {
 	      $$ = $1;



More information about the mesa-commit mailing list