ir_to_mesa: Fix copy and wasted InputsRead/OutputsWritten setup.
authorEric Anholt <eric@anholt.net>
Mon, 28 Jun 2010 03:43:09 +0000 (20:43 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 28 Jun 2010 18:14:47 +0000 (11:14 -0700)
src/mesa/shader/ir_to_mesa.cpp

index 99ec55a0d851286b712f94ce0a3a0e19826978a3..af5237f697c0162957a8cf5fbf4aa29cca71e785 100644 (file)
@@ -1214,10 +1214,10 @@ count_resources(struct gl_program *prog)
       for (reg = 0; reg < _mesa_num_inst_src_regs(inst->Opcode); reg++) {
         switch (inst->SrcReg[reg].File) {
         case PROGRAM_OUTPUT:
-           prog->OutputsWritten |= BITFIELD64_BIT(inst->DstReg.Index);
+           prog->OutputsWritten |= BITFIELD64_BIT(inst->SrcReg[reg].Index);
            break;
         case PROGRAM_INPUT:
-           prog->InputsRead |= BITFIELD64_BIT(inst->DstReg.Index);
+           prog->InputsRead |= BITFIELD64_BIT(inst->SrcReg[reg].Index);
            break;
         default:
            break;