From: Tom Stellard Date: Thu, 13 Oct 2011 23:32:35 +0000 (-0700) Subject: r300/compiler: Don't pair output writes with GPR writes in the scheduler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51fe9994bdec1625a27e12216d492916e64ab622;p=mesa.git r300/compiler: Don't pair output writes with GPR writes in the scheduler --- 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))