diff options
| author | Brian Paul <brianp@vmware.com> | 2009-12-11 10:04:07 -0700 |
|---|---|---|
| committer | Brian Paul <brianp@vmware.com> | 2009-12-11 10:04:07 -0700 |
| commit | a087eb590d780cb82b49464e05ffc85123adce7e (patch) | |
| tree | a2ac3ec2cc0b9001b350664d6e7915aba5e087a9 /src/mesa/shader/programopt.c | |
| parent | cb640c8d40c4ee34160a14d646c244f44a5013f6 (diff) | |
| parent | e128cc205e30540597ecd57849060a6bf4714d9f (diff) | |
Merge branch 'mesa_7_7_branch'
Conflicts:
src/gallium/state_trackers/xorg/xorg_xv.c
src/mesa/drivers/dri/intel/intel_span.c
Diffstat (limited to 'src/mesa/shader/programopt.c')
| -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 a0daac1b80..9514545709 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]; } } |
