util/format,nir: Fix some bugs and add a format conversion helper
This MR adds a NIR version of util_format_[un]pack_rgba()
. We've already got a bunch of format conversion helpers in NIR but this adds a pair of helpers that take data and a pipe_format()
and do it all. I also added unit tests for the new helper that take advantage of NIR's constant folding to compare the NIR helper with the helpers in util/.
Unfortunately, as happens with these things, I found about a half dozen bugs in the core format conversion code.
Tagging @idr as a likely suspect to review.