summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-01-08 01:13:46 -0800
committerVinson Lee <vlee@vmware.com>2010-01-08 01:13:46 -0800
commit3c42e403de9da2abd46cd0d15de107250866859d (patch)
tree46f793ec102aa13c7a8e5a75f69e4929afdc3a4a /src
parent5dd9e23d6204e6ec36468d4ae99e630c782c1cc9 (diff)
r300: Move initial declaration outside for loop.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program.c6
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 0dbc5380bb..a3c41d7bd4 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++;