projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bced6a
)
mesa: better error message for invalid texture unit index
author
Brian Paul
<brianp@vmware.com>
Mon, 8 Jun 2009 15:52:31 +0000
(09:52 -0600)
committer
Brian Paul
<brianp@vmware.com>
Mon, 8 Jun 2009 15:53:00 +0000
(09:53 -0600)
src/mesa/shader/arbprogparse.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/arbprogparse.c
b/src/mesa/shader/arbprogparse.c
index c7a031067efe905b25275f694558387b90d9c480..bb4c5b38d410dec11aa21ff9f44db828150c0498 100644
(file)
--- 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;
}