[Mesa-dev] [PATCH] r600g/sb: use MULADD workaround on R7xx for MULADD_IEEE

Vadim Girlin vadimgirlin at gmail.com
Sat Aug 10 16:08:40 PDT 2013


Looks like the same issue that was seen with MULADD in trans slot on
R7xx also affects MULADD_IEEE (maybe all OP3 instructions and MULADD is
just a most frequently used?). The workaround is to never put
affected instructions into the trans slot.

IIRC it was mostly observed when affected instructions had kcache operands
and some specific bank swizzles, but I have no R7xx hw to verify that, also
I'm still not sure whether it affects R6xx. Probably the condition can be
narrowed to allow better ALU packing in some cases.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=67927

Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
Cc: "9.2" <mesa-stable at lists.freedesktop.org>
---
 src/gallium/drivers/r600/sb/sb_sched.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/sb/sb_sched.cpp b/src/gallium/drivers/r600/sb/sb_sched.cpp
index f0e41f5..2792315 100644
--- a/src/gallium/drivers/r600/sb/sb_sched.cpp
+++ b/src/gallium/drivers/r600/sb/sb_sched.cpp
@@ -1490,7 +1490,8 @@ unsigned post_scheduler::try_add_instruction(node *n) {
 
 		// FIXME workaround for some problems with MULADD in trans slot on r700,
 		// (is it really needed on r600?)
-		if (a->bc.op == ALU_OP3_MULADD && !ctx.is_egcm()) {
+		if ((a->bc.op == ALU_OP3_MULADD || a->bc.op == ALU_OP3_MULADD_IEEE) &&
+				!ctx.is_egcm()) {
 			allowed_slots &= 0x0F;
 		}
 
-- 
1.8.3.1



More information about the mesa-dev mailing list