summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/arbprogparse.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-08 09:52:31 -0600
committerBrian Paul <[email protected]>2009-06-08 09:53:00 -0600
commit33d63277706aede31559a24c0db76b37609e76ef (patch)
tree77aafb2572c4c921f198483317c0035e6163a401 /src/mesa/shader/arbprogparse.c
parent0bced6a326e3520d2b280b4f6cdaadf843ce1d2d (diff)
mesa: better error message for invalid texture unit index
Diffstat (limited to 'src/mesa/shader/arbprogparse.c')
-rw-r--r--src/mesa/shader/arbprogparse.c5
1 files changed, 4 insertions, 1 deletions
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;
}