nir: Make vec-to-movs handle src/dest aliasing

Graphics / Mesa 3D Graphics Library / Mesa - Eric Anholt [anholt.net] - 28 January 2015 18:33 UTC

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.

dd4d9a4 nir: Make vec-to-movs handle src/dest aliasing.
src/glsl/nir/nir_lower_vec_to_movs.c | 82 +++++++++++++++++++++++++++++-----
1 file changed, 72 insertions(+), 10 deletions(-)

Upstream: cgit.freedesktop.org


  • Share