r300: move variables declarations
authorMaciej Cencora <m.cencora@gmail.com>
Sat, 11 Jul 2009 14:37:11 +0000 (16:37 +0200)
committerMaciej Cencora <m.cencora@gmail.com>
Mon, 13 Jul 2009 17:28:14 +0000 (19:28 +0200)
src/mesa/drivers/dri/r300/radeon_nqssadce.c

index d917da58bb34ae488e8abd4e140be5dba96188f7..840c9733b164788a89a444778b7cf51ac78dcebf 100644 (file)
@@ -250,7 +250,6 @@ static void process_instruction(struct nqssadce_state* s)
 static void calculateInputsOutputs(struct gl_program *p)
 {
        struct prog_instruction *inst;
-       int i, tmp;
        GLuint InputsRead, OutputsWritten;
 
        inst = p->Instructions;
@@ -258,8 +257,10 @@ static void calculateInputsOutputs(struct gl_program *p)
        OutputsWritten = 0;
        while (inst->Opcode != OPCODE_END)
        {
-               tmp = _mesa_num_inst_src_regs(inst->Opcode);
-               for (i = 0; i < tmp; ++i) {
+               int i, num_src_regs;
+
+               num_src_regs = _mesa_num_inst_src_regs(inst->Opcode);
+               for (i = 0; i < num_src_regs; ++i) {
                        if (inst->SrcReg[i].File == PROGRAM_INPUT)
                                InputsRead |= 1 << inst->SrcReg[i].Index;
                }