summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-11-17 15:23:32 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-11-17 15:23:32 +0000
commita4806c994e796f06675ebf8860fafc3dffe9ed05 (patch)
tree701aa1d2bc106578f50455bded8e0c482693e65d /src/mesa
parent7984c70070ea3fee1600095b1f32b0f8adf2ad31 (diff)
add STATE_INTERNAL_DRIVER, etc (Rune Petersen)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/program.c10
-rw-r--r--src/mesa/shader/program.h3
2 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index e8824426d4..789d36eba0 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -993,7 +993,9 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[],
break;
}
default:
- _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()");
+ /* unknown state indexes are silently ignored
+ * should be handled by the driver.
+ */
return;
}
}
@@ -1070,7 +1072,9 @@ make_state_flags(const GLint state[])
case STATE_TEXRECT_SCALE:
return _NEW_TEXTURE;
default:
- _mesa_problem(NULL, "unexpected int. state in make_state_flags()");
+ /* unknown state indexes are silently ignored and
+ * no flag set, since it is handled by the driver.
+ */
return 0;
}
@@ -1342,7 +1346,7 @@ make_state_string(const GLint state[6])
case STATE_INTERNAL:
break;
default:
- _mesa_problem(NULL, "Invalid state in maka_state_string");
+ _mesa_problem(NULL, "Invalid state in make_state_string");
break;
}
diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h
index a38a1a63f9..af06c03598 100644
--- a/src/mesa/shader/program.h
+++ b/src/mesa/shader/program.h
@@ -189,7 +189,8 @@ enum state_index {
STATE_INTERNAL, /* Mesa additions */
STATE_NORMAL_SCALE,
STATE_TEXRECT_SCALE,
- STATE_POSITION_NORMALIZED /* normalized light position */
+ STATE_POSITION_NORMALIZED, /* normalized light position */
+ STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */
};