r300/compiler: Fix dataflow bug in presub_helper()
authorTom Stellard <tstellar@gmail.com>
Tue, 7 Sep 2010 17:22:16 +0000 (10:22 -0700)
committerTom Stellard <tstellar@gmail.com>
Sat, 11 Sep 2010 01:18:09 +0000 (18:18 -0700)
src/mesa/drivers/dri/r300/compiler/radeon_optimize.c

index 53efbba4c5668cf95757ea89a61fe56a4c96e30a..88aac949a10b1047c5f6c3d8cc535f970dccfc6a 100644 (file)
@@ -590,6 +590,8 @@ static int presub_helper(
                if (inst->U.I.DstReg.WriteMask &
                                src_reads_dst_mask(s->Inst->U.I.SrcReg[1],
                                                        inst->U.I.DstReg)
+                               || src_reads_dst_mask(s->Inst->U.I.SrcReg[0],
+                                                       inst->U.I.DstReg)
                                || info->IsFlowControl) {
                        cant_sub = 1;
                }