projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1cc4c1
)
st/mesa: additional assertions in dst_register()
author
Brian Paul
<brianp@vmware.com>
Mon, 10 May 2010 18:31:35 +0000
(12:31 -0600)
committer
Brian Paul
<brianp@vmware.com>
Mon, 10 May 2010 18:35:52 +0000
(12:35 -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 0991e99e76c1c4837ea6cb4e50776916bb0c0d50..bda8267fac0bf9bd77c1d163dbeccb972620fd45 100644
(file)
--- a/
src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/
src/mesa/state_tracker/st_mesa_to_tgsi.c
@@
-156,6
+156,16
@@
dst_register( struct st_translate *t,
case PROGRAM_OUTPUT:
if (index == VERT_RESULT_PSIZ)
t->prevInstWrotePsiz = GL_TRUE;
+
+ if (t->procType == TGSI_PROCESSOR_VERTEX)
+ assert(index < VERT_RESULT_MAX);
+ else if (t->procType == TGSI_PROCESSOR_FRAGMENT)
+ assert(index < FRAG_RESULT_MAX);
+ else
+ assert(0 && "geom shaders not handled in dst_register() yet");
+
+ assert(t->outputMapping[index] < Elements(t->outputs));
+
return t->outputs[t->outputMapping[index]];
case PROGRAM_ADDRESS: