r5xx: Unbreak MAX and MIN.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Thu, 15 May 2008 07:11:10 +0000 (00:11 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 17 May 2008 14:12:37 +0000 (07:12 -0700)
Both of them had faulty copypasta.

src/mesa/drivers/dri/r300/r500_fragprog.c

index a986947e9d829178479d370105504c733ac41ead..2f63f3010e2bed987b1a92820fde7fefb409cb46 100644 (file)
@@ -509,7 +509,7 @@ static GLboolean parse_program(struct r500_fragment_program *fp)
                                break;
                        case OPCODE_MAX:
                                src[0] = make_src(fp, fpi->SrcReg[0]);
-                               src[1] = make_src(fp, fpi->SrcReg[0]);
+                               src[1] = make_src(fp, fpi->SrcReg[1]);
                                fp->inst[counter].inst0 = R500_INST_TYPE_ALU | pixel_mask;
                                fp->inst[counter].inst1 = R500_RGB_ADDR0(src[0]) | R500_RGB_ADDR1(src[1]);
                                fp->inst[counter].inst2 = R500_ALPHA_ADDR0(src[0]) | R500_ALPHA_ADDR1(src[1]);
@@ -526,7 +526,7 @@ static GLboolean parse_program(struct r500_fragment_program *fp)
                                break;
                        case OPCODE_MIN:
                                src[0] = make_src(fp, fpi->SrcReg[0]);
-                               src[1] = make_src(fp, fpi->SrcReg[0]);
+                               src[1] = make_src(fp, fpi->SrcReg[1]);
                                fp->inst[counter].inst0 = R500_INST_TYPE_ALU | pixel_mask;
                                fp->inst[counter].inst1 = R500_RGB_ADDR0(src[0]) | R500_RGB_ADDR1(src[1]);
                                fp->inst[counter].inst2 = R500_ALPHA_ADDR0(src[0]) | R500_ALPHA_ADDR1(src[1]);