summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-09-13 11:29:00 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-09-13 11:29:00 -0600
commitd799b7a7ecbe3e773decfcc2ebd1b23f53fc48a7 (patch)
tree11e876552075652bfdc45b808ed7e62fbe7e5ea6 /src/mesa/shader
parentf3419d5ead719c881c8a240dd1c204bfc2abf502 (diff)
Fix state.texgen parsing error (bug 12313).
Replace *(*inst++) with *(*inst)++ in a few places.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/arbprogparse.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 9a5290d920..737194d3b6 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -1226,10 +1226,10 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
state_tokens[1] = coord;
/* EYE or OBJECT */
- type = *(*inst++);
+ type = *(*inst)++;
/* 0 - s, 1 - t, 2 - r, 3 - q */
- coord = *(*inst++);
+ coord = *(*inst)++;
if (type == TEX_GEN_EYE) {
switch (coord) {
@@ -1245,6 +1245,9 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
case COMPONENT_W:
state_tokens[2] = STATE_TEXGEN_EYE_Q;
break;
+ default:
+ _mesa_problem(ctx, "bad texgen component in "
+ "parse_state_single_item()");
}
}
else {
@@ -1261,6 +1264,9 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
case COMPONENT_W:
state_tokens[2] = STATE_TEXGEN_OBJECT_Q;
break;
+ default:
+ _mesa_problem(ctx, "bad texgen component in "
+ "parse_state_single_item()");
}
}
}
@@ -1283,7 +1289,7 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
break;
case STATE_POINT:
- switch (*(*inst++)) {
+ switch (*(*inst)++) {
case POINT_SIZE:
state_tokens[0] = STATE_POINT_SIZE;
break;
@@ -2454,8 +2460,9 @@ parse_src_reg (GLcontext * ctx, const GLubyte ** inst,
Program->Position = parse_position (inst);
if (!found) {
- program_error(ctx, Program->Position,
- "2: Undefined variable"); /* src->name */
+ char s[1000];
+ sprintf(s, "Undefined variable: %s", src->name);
+ program_error(ctx, Program->Position, s);
return 1;
}