Module: Mesa Branch: mesa_7_7_branch Commit: 3c42e403de9da2abd46cd0d15de107250866859d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c42e403de9da2abd46cd0d15de107250866859d
Author: Vinson Lee <v...@vmware.com> Date: Fri Jan 8 01:13:46 2010 -0800 r300: Move initial declaration outside for loop. --- .../drivers/dri/r300/compiler/radeon_program.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.c b/src/mesa/drivers/dri/r300/compiler/radeon_program.c index 0dbc538..a3c41d7 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.c @@ -94,10 +94,11 @@ unsigned int rc_find_free_temporary(struct radeon_compiler * c) { char used[RC_REGISTER_MAX_INDEX]; unsigned int i; + struct rc_instruction * rcinst; memset(used, 0, sizeof(used)); - for (struct rc_instruction * rcinst = c->Program.Instructions.Next; rcinst != &c->Program.Instructions; rcinst = rcinst->Next) { + for (rcinst = c->Program.Instructions.Next; rcinst != &c->Program.Instructions; rcinst = rcinst->Next) { const struct rc_sub_instruction *inst = &rcinst->U.I; const struct rc_opcode_info *opcode = rc_get_opcode_info(inst->Opcode); unsigned int k; @@ -168,8 +169,9 @@ void rc_remove_instruction(struct rc_instruction * inst) unsigned int rc_recompute_ips(struct radeon_compiler * c) { unsigned int ip = 0; + struct rc_instruction * inst; - for(struct rc_instruction * inst = c->Program.Instructions.Next; + for(inst = c->Program.Instructions.Next; inst != &c->Program.Instructions; inst = inst->Next) { inst->IP = ip++; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit