nir: Make vec-to-movs handle src/dest aliasing.
authorEric Anholt <eric@anholt.net>
Thu, 22 Jan 2015 21:08:59 +0000 (13:08 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 29 Jan 2015 00:33:34 +0000 (16:33 -0800)
commitdd4d9a4e62ecf44011cfa2e020d08029299dd7e0
tree2a6534f587d236fb10654c8aef8b05abd38d7c66
parentd70eb3851753ed7b57c56e4a7fd538857e4385ce
nir: Make vec-to-movs handle src/dest aliasing.

It now emits vector MOVs instead of a series of individual MOVs, which
should be useful to any vector backends.  This pushes the problem of
src/dest aliasing of channels on a scalar chip to the backend, but if
there are any vector operations in your shader then you needed to be
handling this already.

Fixes fs-swap-problem with my scalarizing patches.

v2: Rename to insert_mov(), and add a comment about what it does.
v3: Rewrite the comment.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com> (v3)
src/glsl/nir/nir_lower_vec_to_movs.c