projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
396f2cd
)
st/mesa: additional assertions in st_translate_mesa_program()
author
Brian Paul
<brianp@vmware.com>
Thu, 8 Jul 2010 14:51:22 +0000
(08:51 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 8 Jul 2010 14:51:22 +0000
(08:51 -0600)
src/mesa/state_tracker/st_mesa_to_tgsi.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_mesa_to_tgsi.c
b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index f5c9c4d5c1af4ab09f5aa6ae8a007866e191d909..fdf023d6ae39b674bf9207c2bfb29fcaa63dbb45 100644
(file)
--- 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);
}