nir: Expand opt_undef to handle undef channels in a store intrinsic.
authorEric Anholt <eric@anholt.net>
Thu, 23 Jul 2020 21:24:15 +0000 (14:24 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 20 Aug 2020 16:44:08 +0000 (16:44 +0000)
commit5f26c21e62466783cd031c45a39544c992cee202
treead209eb55d4cc33fb5cb7582f2e7262dfe3c8524
parenta29b7b6ff5c2a3531cf6cac4aa8bda4f76d801ee
nir: Expand opt_undef to handle undef channels in a store intrinsic.

Instead of only handling all-undef stores, shrink the writemask to just
the defined channels.  Cleans up a bunch of writemasks on prog_to_nir
output in particular.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
src/compiler/nir/nir_opt_undef.c