diff options
author | Eric Anholt <[email protected]> | 2014-09-23 12:50:05 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-09-23 13:51:29 -0700 |
commit | 3e5325e8c9a389c087bb4943f99f7a8db9e8347c (patch) | |
tree | bf0be7c1378de071b87a6607c840d063833b2798 | |
parent | 2e48b286bf21501ac06832799a4b7957bb8ac893 (diff) |
vc4: Fix overzealous raddr conflict resolution.
We only need to do the fixup when both args are in the same file, not just
when both are in physical registers.
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qpu_emit.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c index 81b3b8bd784..985f2c4bdab 100644 --- a/src/gallium/drivers/vc4/vc4_qpu_emit.c +++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c @@ -79,12 +79,14 @@ static void fixup_raddr_conflict(struct vc4_compile *c, struct qpu_reg src0, struct qpu_reg *src1) { - if ((src0.mux == QPU_MUX_A || src0.mux == QPU_MUX_B) && - (src1->mux == QPU_MUX_A || src1->mux == QPU_MUX_B) && - src0.addr != src1->addr) { - queue(c, qpu_a_MOV(qpu_r3(), *src1)); - *src1 = qpu_r3(); + if ((src0.mux != QPU_MUX_A && src0.mux != QPU_MUX_B) || + src0.mux != src1->mux || + src0.addr == src1->addr) { + return; } + + queue(c, qpu_a_MOV(qpu_r3(), *src1)); + *src1 = qpu_r3(); } static void |