From 33d63277706aede31559a24c0db76b37609e76ef Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 8 Jun 2009 09:52:31 -0600 Subject: mesa: better error message for invalid texture unit index --- src/mesa/shader/arbprogparse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index c7a031067ef..bb4c5b38d41 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1014,7 +1014,10 @@ parse_teximage_num (GLcontext * ctx, const GLubyte ** inst, GLint i = parse_integer (inst, Program); if ((i < 0) || (i >= (int)ctx->Const.MaxTextureImageUnits)) { - program_error(ctx, Program->Position, "Invalid texture image index"); + char s[100]; + _mesa_snprintf(s, sizeof(s), "Invalid texture image index %d (%u is max)", + i, ctx->Const.MaxTextureImageUnits); + program_error(ctx, Program->Position, s); return 1; } -- cgit v1.2.3