From: Brian Paul Date: Mon, 8 Jun 2009 15:52:31 +0000 (-0600) Subject: mesa: better error message for invalid texture unit index X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=33d63277706aede31559a24c0db76b37609e76ef;p=mesa.git mesa: better error message for invalid texture unit index --- 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; }