summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2010-09-28 23:10:09 -0700
committerTom Stellard <[email protected]>2010-09-28 23:52:41 -0700
commitb27a809266bd664cd101fcfdf20886cc2b7df787 (patch)
treebd23791ebb8dd9bfc663f03b5ed4128875b65daa
parent1b76dde0cd90509da0acc631f6599fb6f7fe676d (diff)
r300/compiler: Don't merge instructions that write output regs and ALU result
https://bugs.freedesktop.org/show_bug.cgi?id=30415 NOTE: This is a candidate for the 7.9 branch.
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
index a33b2fde7b5..38bae26f3c1 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
@@ -475,6 +475,12 @@ static int merge_instructions(struct rc_pair_instruction * rgb, struct rc_pair_i
{
struct rc_pair_instruction backup;
+ /*Instructions can't write output registers and ALU result at the
+ * same time. */
+ if ((rgb->WriteALUResult && alpha->Alpha.OutputWriteMask)
+ || (rgb->RGB.OutputWriteMask && alpha->WriteALUResult)) {
+ return 0;
+ }
memcpy(&backup, rgb, sizeof(struct rc_pair_instruction));
if (destructive_merge_instructions(rgb, alpha))