From: Eric Anholt Date: Tue, 16 Jun 2015 00:47:12 +0000 (-0700) Subject: vc4: Swap around which src we spill to ra31/rb31. X-Git-Tag: android-x86-6.0-r1~9438 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d4d27361499cac73da4716b571519ecb71cef551;p=android-x86%2Fexternal-mesa.git vc4: Swap around which src we spill to ra31/rb31. I wanted to assert that src1 came from a non-unspilled register in shader validation, and this easily gets us that. And, as a bonus: total instructions in shared programs: 93347 -> 92723 (-0.67%) instructions in affected programs: 60524 -> 59900 (-1.03%) --- diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c index 577eb9200f4..99afe4b8798 100644 --- a/src/gallium/drivers/vc4/vc4_qpu_emit.c +++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c @@ -117,11 +117,11 @@ fixup_raddr_conflict(struct vc4_compile *c, return; if (mux0 == QPU_MUX_A) { - queue(c, qpu_a_MOV(qpu_rb(31), *src1)); - *src1 = qpu_rb(31); + queue(c, qpu_a_MOV(qpu_rb(31), *src0)); + *src0 = qpu_rb(31); } else { - queue(c, qpu_a_MOV(qpu_ra(31), *src1)); - *src1 = qpu_ra(31); + queue(c, qpu_a_MOV(qpu_ra(31), *src0)); + *src0 = qpu_ra(31); } }