Mesa (7.9): r300/compiler: disable the rename_regs pass for loops

Marek Olšák mareko at kemper.freedesktop.org
Fri Jan 7 06:25:38 UTC 2011


Module: Mesa
Branch: 7.9
Commit: d0f0a6920b988d62ad888763c17e0a92f100b668
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0f0a6920b988d62ad888763c17e0a92f100b668

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Jan  7 07:25:12 2011 +0100

r300/compiler: disable the rename_regs pass for loops

This workaround fixes rendering of kwin thumbnails.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 8543902bfbdfc15c39525bd99bee22e2f2126e74)

Conflicts:

	src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c

---

 .../drivers/dri/r300/compiler/radeon_rename_regs.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c b/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
index 31d25f9..763e9a5 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
@@ -94,6 +94,14 @@ void rc_rename_regs(struct radeon_compiler *c, void *user)
 	struct rc_instruction * inst;
 	unsigned int * masks;
 
+	/* XXX Remove this once the register allocation works with flow control. */
+	for(inst = c->Program.Instructions.Next;
+					inst != &c->Program.Instructions;
+					inst = inst->Next) {
+		if (inst->U.I.Opcode == RC_OPCODE_BGNLOOP)
+			return;
+	}
+
 	/* The number of instructions in the program is also the maximum
 	 * number of temp registers that could potentially be used. */
 	icount = rc_recompute_ips(c);




More information about the mesa-commit mailing list