From 51fe9994bdec1625a27e12216d492916e64ab622 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 13 Oct 2011 16:32:35 -0700 Subject: [PATCH] r300/compiler: Don't pair output writes with GPR writes in the scheduler --- src/gallium/drivers/r300/compiler/radeon_pair_schedule.c | 7 +++++++ 1 file changed, 7 insertions(+) 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)) -- 2.30.2