Module: Mesa
Branch: master
Commit: 51fe9994bdec1625a27e12216d492916e64ab622
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=51fe9994bdec1625a27e12216d492916e64ab622

Author: Tom Stellard <[email protected]>
Date:   Thu Oct 13 16:32:35 2011 -0700

r300/compiler: Don't pair output writes with GPR writes in the scheduler

---

 .../drivers/r300/compiler/radeon_pair_schedule.c   |    7 +++++++
 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 1f589cd..ee868cc 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))

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to