aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2011-02-25 11:49:23 -0500
committerJerome Glisse <[email protected]>2011-02-25 11:49:23 -0500
commit8e17adfdbd96ba1a11cda329ddfd2b997255ea20 (patch)
tree57cf829f2143ea1a1f38ec793dd7c73f37acf362 /src
parent179ff0551c4938e59f4b57fec0a10d63f012d7c6 (diff)
gallium/st: place value check before value is use
7.9 & 7.10 candidate Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src')
-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 5c68fd78c30..c07739f9d53 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: