nir/builder: Add a nir_pack/unpack/bitcast helpers
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 13 Nov 2018 00:38:24 +0000 (18:38 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 16 Nov 2018 01:59:28 +0000 (19:59 -0600)
commitf16bd8a9feec026d2a11a203d860189be954896d
tree10e279728f3ffbfee74ad6d0e2add0b0d616116c
parentb77d68b78e2bf623bf9ba3f28945cf2080185a9d
nir/builder: Add a nir_pack/unpack/bitcast helpers

The new helpers can generate any pack/unpack operation including those
for which we do not have specific opcodes and they express a bitcast in
terms of these pack/unpack operations.  In particular, the new helpers
properly handle 8-bit types.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/compiler/nir/nir_builder.h
src/compiler/spirv/vtn_alu.c