From 6754ec831e5aaec516db929c8db6e7478a2f5540 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 12 Aug 2012 23:30:18 -0700 Subject: [PATCH] i965: Fix accumulator_contains() test to also reject swizzles of the dst. When faced with this sequence: MOV R1, c[1]; MAD R0, R2, R1.x, R1.y; we were concluding that the MOV of R1 set up our accumulator and so we could just use the previous result. Only, it's got R1.xyzw in it instead of the r1.y we're looking for. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46784 NOTE: This is a candidate for the 8.0 branch. --- src/mesa/drivers/dri/i965/brw_vs_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index 6169f737417..177b2b31a29 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -1743,7 +1743,7 @@ accumulator_contains(struct brw_vs_compile *c, struct brw_reg val) if (val.address_mode != BRW_ADDRESS_DIRECT) return false; - if (val.negate || val.abs) + if (val.negate || val.abs || val.dw1.bits.swizzle != BRW_SWIZZLE_XYZW) return false; switch (prev_insn->header.opcode) { -- 2.30.2