r600g: Check for relative addressing in destination register when trying to merge...
authorFabian Bieler <der.fabe@gmx.net>
Thu, 3 Mar 2011 09:08:08 +0000 (10:08 +0100)
committerHenri Verbeet <hverbeet@gmail.com>
Tue, 22 Mar 2011 20:24:09 +0000 (21:24 +0100)
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
src/gallium/drivers/r600/r600_asm.c

index 240093f9b9db52bcdbde6d27ffdb2271dde83d81..c22bd8e228c1f30a7fc694e8cf474b5f2f75b5bc 100644 (file)
@@ -953,10 +953,17 @@ static int merge_inst_groups(struct r600_bc *bc, struct r600_bc_alu *slots[5],
                } else
                        result[i] = slots[i];
 
-               // let's check source gprs
                alu = slots[i];
                num_once_inst += is_alu_once_inst(bc, alu);
 
+               // let's check dst gpr
+               if (alu->dst.rel) {
+                       if (have_mova)
+                               return 0;
+                       have_rel = 1;
+               }
+
+               // let's check source gprs
                num_src = r600_bc_get_num_operands(bc, alu);
                for (src = 0; src < num_src; ++src) {
                        if (alu->src[src].rel) {