Mesa (7.9): r300/compiler: Don' t merge instructions that write output regs and ALU result
Tom Stellard
tstellar at kemper.freedesktop.org
Wed Sep 29 18:20:12 UTC 2010
Module: Mesa
Branch: 7.9
Commit: f282d7267869644f6cf5f4032b422e801a7f12a2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f282d7267869644f6cf5f4032b422e801a7f12a2
Author: Tom Stellard <tstellar at gmail.com>
Date: Tue Sep 28 23:10:09 2010 -0700
r300/compiler: Don't merge instructions that write output regs and ALU result
https://bugs.freedesktop.org/show_bug.cgi?id=30415
(cherry picked from commit b27a809266bd664cd101fcfdf20886cc2b7df78)
---
.../dri/r300/compiler/radeon_pair_schedule.c | 6 ++++++
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 5269d65..7ab2df3 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))
More information about the mesa-commit
mailing list