Skip to content

nir: Add nir_x/y/z/w helpers, but don't use them treewide

Alyssa Rosenzweig requested to merge alyssa/mesa:nir/xyzw into main

These have a few benefits over nir_channel:

  • Shorter.
  • Wraps more nicely.. it's weird to have the 0 on a different line from the thing you're taking the channel of, versus reading left-to-right top-to-bottom with nir_x you know you're interested in the x component.
  • Sometimes clearer, though this might be a wash.

However, they're sometimes more annoying than they're worth, so this MR adds the helpers as an optional convenience but doesn't convert the tree to use them.

Merge request reports