From 8e17adfdbd96ba1a11cda329ddfd2b997255ea20 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Fri, 25 Feb 2011 11:49:23 -0500 Subject: [PATCH] gallium/st: place value check before value is use 7.9 & 7.10 candidate Signed-off-by: Jerome Glisse --- src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.30.2