summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2011-02-25 11:49:23 -0500
committerJerome Glisse <jglisse@redhat.com>2011-02-25 11:49:23 -0500
commit8e17adfdbd96ba1a11cda329ddfd2b997255ea20 (patch)
tree57cf829f2143ea1a1f38ec793dd7c73f37acf362 /src/mesa
parent179ff0551c4938e59f4b57fec0a10d63f012d7c6 (diff)
gallium/st: place value check before value is use
7.9 & 7.10 candidate Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 5c68fd78c3..c07739f9d5 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -224,9 +224,9 @@ src_register( struct st_translate *t,
case PROGRAM_TEMPORARY:
assert(index >= 0);
+ assert(index < Elements(t->temps));
if (ureg_dst_is_undef(t->temps[index]))
t->temps[index] = ureg_DECL_temporary( t->ureg );
- assert(index < Elements(t->temps));
return ureg_src(t->temps[index]);
case PROGRAM_NAMED_PARAM: