summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-07-08 08:51:22 -0600
committerBrian Paul <[email protected]>2010-07-08 08:51:22 -0600
commit7c6a89727543e7f0b72b792ec77f02565337e923 (patch)
tree314e2edc4ac537877d19fc084d7d8ac958b3c106 /src/mesa
parent396f2cd94ffe4f11af79a1ed58fb6443fd6e124a (diff)
st/mesa: additional assertions in st_translate_mesa_program()
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index f5c9c4d5c1a..fdf023d6ae3 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -922,6 +922,9 @@ st_translate_mesa_program(
unsigned i;
enum pipe_error ret = PIPE_OK;
+ assert(numInputs <= Elements(t->inputs));
+ assert(numOutputs <= Elements(t->outputs));
+
t = &translate;
memset(t, 0, sizeof *t);
@@ -1004,6 +1007,8 @@ st_translate_mesa_program(
}
}
else {
+ assert(procType == TGSI_PROCESSOR_VERTEX);
+
for (i = 0; i < numInputs; i++) {
t->inputs[i] = ureg_DECL_vs_input(ureg, i);
}