diff options
author | Brian Paul <[email protected]> | 2009-12-11 09:40:33 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-11 09:40:33 -0700 |
commit | d8f8eca9efaf2f537cf9218e4dd1d742e19ffc76 (patch) | |
tree | 32d428e820fb7638854f50b12dfb3152635cc125 /src/mesa/shader | |
parent | 5076a4f53a2f34cc9116b45951037f639885c7a1 (diff) |
mesa: remove unnecessary loop in _mesa_remove_output_reads()
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/programopt.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index f70c75cec8e..c5b821d94f0 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -528,15 +528,11 @@ _mesa_remove_output_reads(struct gl_program *prog, gl_register_file type) /* look for instructions which write to the varying vars identified above */ for (i = 0; i < prog->NumInstructions; i++) { struct prog_instruction *inst = prog->Instructions + i; - const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode); - GLuint j; - for (j = 0; j < numSrc; j++) { - if (inst->DstReg.File == type && - outputMap[inst->DstReg.Index] >= 0) { - /* change inst to write to the temp reg, instead of the varying */ - inst->DstReg.File = PROGRAM_TEMPORARY; - inst->DstReg.Index = outputMap[inst->DstReg.Index]; - } + if (inst->DstReg.File == type && + outputMap[inst->DstReg.Index] >= 0) { + /* change inst to write to the temp reg, instead of the varying */ + inst->DstReg.File = PROGRAM_TEMPORARY; + inst->DstReg.Index = outputMap[inst->DstReg.Index]; } } |