summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2011-10-13 16:32:35 -0700
committerTom Stellard <[email protected]>2011-10-14 18:30:14 -0700
commit51fe9994bdec1625a27e12216d492916e64ab622 (patch)
treee19946aab4e0ef0524543cb0d1ea059d1aca3a8d
parent6fafb6beb7df333cc2f7837407796c7970a6bfa6 (diff)
r300/compiler: Don't pair output writes with GPR writes in the scheduler
-rw-r--r--src/gallium/drivers/r300/compiler/radeon_pair_schedule.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_schedule.c b/src/gallium/drivers/r300/compiler/radeon_pair_schedule.c
index 1f589cdb98e..ee868ccba3a 100644
--- a/src/gallium/drivers/r300/compiler/radeon_pair_schedule.c
+++ b/src/gallium/drivers/r300/compiler/radeon_pair_schedule.c
@@ -511,6 +511,13 @@ static int merge_instructions(struct rc_pair_instruction * rgb, struct rc_pair_i
return 0;
}
+ /* Writing output registers in the middle of shaders is slow, so
+ * we don't want to pair output writes with temp writes. */
+ if ((rgb->RGB.OutputWriteMask && !alpha->Alpha.OutputWriteMask)
+ || (!rgb->RGB.OutputWriteMask && alpha->Alpha.OutputWriteMask)) {
+ return 0;
+ }
+
memcpy(&backup, rgb, sizeof(struct rc_pair_instruction));
if (destructive_merge_instructions(rgb, alpha))