freedreno/ir3: fix grouping issue w/ reverse swizzles
authorRob Clark <robclark@freedesktop.org>
Mon, 18 Apr 2016 15:32:40 +0000 (11:32 -0400)
committerRob Clark <robclark@freedesktop.org>
Mon, 18 Apr 2016 19:41:32 +0000 (15:41 -0400)
commit77a9107bf299faa738737ed105c1b5e5ac06d1ca
tree948a93c4fcfce1d01f4d1a90d85e28c218f2f6bf
parented66c75784e3a51d414a6c4e90820d908d724b80
freedreno/ir3: fix grouping issue w/ reverse swizzles

When we have something like:

   MOV OUT[n], IN[m].wzyx

the existing grouping code was missing a potential conflict.  Due to
input needing to be sequential scalar regs, we have:

 IN:  x <-> y <-> z <-> w

which would be grouped to:

 OUT: w <-> z2 <-> y2 <-> x  (where the 2 denotes a copy/mov)

but that can't actually work.  We need to realize that x and w are
already in the same chain, not just that they aren't both already in
new chain being built.

With this fixed, we probably no longer need the hack from f68f6c0.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3_group.c