nir/vec_to_movs: Don't generate MOVs for undef channels.
authorEric Anholt <eric@anholt.net>
Mon, 1 Mar 2021 19:57:19 +0000 (11:57 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Mar 2021 00:51:44 +0000 (00:51 +0000)
commit8bd0cc1a5a5fe80fcf7ae25d00e7aea1cd2e3987
treeaf6185ed27bcd0107d3e4d8fb37f6427b9123479
parent1e5ef4c60c69b55ff4284cb1514936fc88bb4cd6
nir/vec_to_movs: Don't generate MOVs for undef channels.

This appeared in softpipe's image operations, since NIR always uses
4-component values for the coords, while the GLSL IR only has 2 components
for a 2D image (for example).
arb_shader_image_load_store-shader-mem-barrier (which times out in CI and
spends its time inside of tgsi_exec) was spending 4/51 of its instructions
on moving these undefs around.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9345>
src/compiler/nir/nir_lower_vec_to_movs.c